From d58e94b5f56a1b12db9054ce39aa3dd5f0453c66 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Mon, 9 Sep 2013 13:32:26 +0200 Subject: [PATCH] dak/update_db.py: Allow version numbers > 99 in db max(['100', '99]) returns '99', not '100', so switch order around a bit to allow for higher versions. Signed-off-by: Tollef Fog Heen --- dak/update_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dak/update_db.py b/dak/update_db.py index 5bbc40c5..61a10892 100755 --- a/dak/update_db.py +++ b/dak/update_db.py @@ -158,7 +158,7 @@ Updates dak's database schema to the lastest version. You should disable crontab database_revision = 0 dbfiles = glob(os.path.join(os.path.dirname(__file__), 'dakdb/update*.py')) - required_database_schema = int(max(findall('update(\d+).py', " ".join(dbfiles)))) + required_database_schema = max(map(int, findall('update(\d+).py', " ".join(dbfiles)))) print "dak database schema at %d" % database_revision print "dak version requires schema %d" % required_database_schema -- 2.39.2