[dak/master] 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 <tfheen@err.no>
---
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 5bbc40c..61a1089 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
--
1.7.10.4
Reply to: