From 0787efc1cc705554f25ad4272e7d45ff6e87ccbc Mon Sep 17 00:00:00 2001 From: mangototango Date: Thu, 21 Oct 2021 05:32:53 +0000 Subject: [PATCH] ignore non-numeric parts of version string --- src/infi/clickhouse_orm/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infi/clickhouse_orm/database.py b/src/infi/clickhouse_orm/database.py index 37c6bf5..703e982 100644 --- a/src/infi/clickhouse_orm/database.py +++ b/src/infi/clickhouse_orm/database.py @@ -413,7 +413,7 @@ class Database(object): except ServerError as e: logger.exception('Cannot determine server version (%s), assuming 1.1.0', e) ver = '1.1.0' - return tuple(int(n) for n in ver.split('.')) if as_tuple else ver + return tuple(int(n) for n in ver.split('.') if n.isdigit()) if as_tuple else ver def _is_existing_database(self): r = self._send("SELECT count() FROM system.databases WHERE name = '%s'" % self.db_name)