From: Tollef Fog Heen Date: Mon, 9 Sep 2013 11:32:26 +0000 (+0200) Subject: dak/update_db.py: Allow version numbers > 99 in db X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d58e94b5f56a1b12db9054ce39aa3dd5f0453c66;p=dak 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 --- 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