From: Joerg Jaspert Date: Mon, 12 May 2008 11:34:17 +0000 (+0200) Subject: Fix yaml dump bug in syck by using yaml instead X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39b66e7412290affc13397a55df518c29b238c8f;p=dak Fix yaml dump bug in syck by using yaml instead --- diff --git a/ChangeLog b/ChangeLog index bca99f63..3b0d04f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ +2008-05-12 Joerg Jaspert + + * dak/transitions.py: use yaml.dump instead of syck.dump, as syck + seems to have a bug in its dump(), causing it to write illegal entries + 2008-05-10 Stephen Gran - * tools/debianqueued-0.9/debianqueued: First pass at a send_mail + * tools/debianqueued-0.9/debianqueued: First pass at a send_mail implementation that sucks less * Update debian/control to reflect new perl dependency diff --git a/dak/transitions.py b/dak/transitions.py index a37dbef9..e4b6d582 100755 --- a/dak/transitions.py +++ b/dak/transitions.py @@ -29,6 +29,7 @@ from daklib import database from daklib import utils from daklib.dak_exceptions import TransitionsError import syck +import yaml # Globals Cnf = None @@ -219,7 +220,7 @@ def write_transitions(from_trans): temp_lock = lock_file(trans_temp) destfile = file(trans_temp, 'w') - syck.dump(from_trans, destfile) + yaml.dump(from_trans, destfile, default_flow_style=False) destfile.close() os.rename(trans_temp, trans_file) @@ -259,7 +260,7 @@ def temp_transitions_file(transitions): (fd, path) = tempfile.mkstemp("", "transitions", Cnf["Transitions::TempPath"]) os.chmod(path, 0644) f = open(path, "w") - syck.dump(transitions, f) + yaml.dump(transitions, f, default_flow_style=False) return path ################################################################################