提交 d58e94b5 编写于 作者: T Tollef Fog Heen 提交者: Tollef Fog Heen

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: NTollef Fog Heen <tfheen@err.no>
上级 c9eb5648
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册