]> git.decadent.org.uk Git - dak.git/blobdiff - dak/transitions.py
Its subprocess.PIPE, not PIPE
[dak.git] / dak / transitions.py
index e4b6d582fbd8f40f5ea3b048210c46963feabc1d..750d146b872b9fa67266e6a07fded87b0e1c1f68 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# Display, edit and check the release manager's transition file.
+""" Display, edit and check the release manager's transition file. """
 # Copyright (C) 2008 Joerg Jaspert <joerg@debian.org>
 
 # This program is free software; you can redistribute it and/or modify
 
 ################################################################################
 
-import os, pg, sys, time, errno, fcntl, tempfile, pwd, re
+import os, pg, sys, time, errno, fcntl, tempfile, pwd
 import apt_pkg
 from daklib import database
 from daklib import utils
 from daklib.dak_exceptions import TransitionsError
-import syck
+from daklib.regexes import re_broken_package
 import yaml
 
 # Globals
@@ -36,8 +36,6 @@ Cnf = None
 Options = None
 projectB = None
 
-re_broken_package = re.compile(r"[a-zA-Z]\w+\s+\-.*")
-
 ################################################################################
 
 #####################################
@@ -106,10 +104,10 @@ def load_transitions(trans_file):
     sourcecontent = sourcefile.read()
     failure = False
     try:
-        trans = syck.load(sourcecontent)
-    except syck.error, msg:
+        trans = yaml.load(sourcecontent)
+    except yaml.YAMLError, exc:
         # Someone fucked it up
-        print "ERROR: %s" % (msg)
+        print "ERROR: %s" % (exc)
         return None
 
     # lets do further validation here