[dak/master 4/6] 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 <mario@ossystems.com.br>
---
dak/init_db.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dak/init_db.py b/dak/init_db.py
index a34ec4c..daccdde 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()
--
1.6.5
Reply to: