X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Ftransitions.py;h=750d146b872b9fa67266e6a07fded87b0e1c1f68;hb=46ca5f337b777e413b80774e2e19669779988944;hp=e4b6d582fbd8f40f5ea3b048210c46963feabc1d;hpb=39b66e7412290affc13397a55df518c29b238c8f;p=dak.git diff --git a/dak/transitions.py b/dak/transitions.py index e4b6d582..750d146b 100755 --- a/dak/transitions.py +++ b/dak/transitions.py @@ -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 # This program is free software; you can redistribute it and/or modify @@ -23,12 +23,12 @@ ################################################################################ -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