]> git.decadent.org.uk Git - dak.git/blobdiff - dak/transitions.py
use correct function name
[dak.git] / dak / transitions.py
index 005d109eadfa1f0d1bd8c3af99abcc44feea4b26..808831b1cd49f66dbc67de49babc5532400256bf 100755 (executable)
@@ -84,9 +84,7 @@ def init():
     if Options["help"]:
         usage()
 
-    whoami = os.getuid()
-    whoamifull = pwd.getpwuid(whoami)
-    username = whoamifull[0]
+    username = utils.getusername()
     if username != "dak":
         print "Non-dak user: %s" % username
         Options["sudo"] = "y"
@@ -526,13 +524,16 @@ def transition_info(transitions):
     @type transitions: dict
     @param transitions: defined transitions
     """
+
+    session = DBConn().session()
+
     for trans in transitions:
         t = transitions[trans]
         source = t["source"]
         expected = t["new"]
 
         # Will be empty list if nothing is in testing.
-        sources = get_suite_version(source, "testing")
+        sources = get_source_in_suite(source, "testing", session)
 
         print get_info(trans, source, expected, t["rm"], t["reason"], t["packages"])