From: Mario Domenech Goulart Date: Mon, 8 Feb 2010 18:45:35 +0000 (-0200) Subject: init_db.py: `Cnf.get' fix for `do_priority' X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=81c96741c982115eb481b460864657d796278255;p=dak.git init_db.py: `Cnf.get' fix for `do_priority' Apparently, the `get' method expects its secong argument to be an string, not a number. Without this fix I get p.level = self.Cnf.get("Priority::%s", 0) TypeError: argument 2 must be string, not int Setting the second arg as "0" makes the error disappear. Signed-off-by: Mario Domenech Goulart --- diff --git a/dak/init_db.py b/dak/init_db.py index a34ec4cf..daccddef 100755 --- a/dak/init_db.py +++ b/dak/init_db.py @@ -174,7 +174,7 @@ class InitDB(object): for priority in self.Cnf.SubTree("Priority").List(): p = Priority() p.priority = priority - p.level = self.Cnf.get("Priority::%s", 0) + p.level = self.Cnf.get("Priority::%s", "0") s.add(p) s.commit()