if not Cnf.has_key("Edit-Transitions::Options::%s" % (i)):
Cnf["Edit-Transitions::Options::%s" % (i)] = ""
- apt_pkg.ParseCommandLine(Cnf, Arguments, sys.argv)
+ apt_pkg.parse_commandline(Cnf, Arguments, sys.argv)
- Options = Cnf.SubTree("Edit-Transitions::Options")
+ Options = Cnf.subtree("Edit-Transitions::Options")
if Options["help"]:
usage()
else:
trans = load_transitions(from_file)
if trans is None:
- raise TransitionsError, "Unparsable transitions file %s" % (file)
+ raise TransitionsError("Unparsable transitions file %s" % (file))
write_transitions(trans)
################################################################################
"""
(fd, path) = tempfile.mkstemp("", "transitions", Cnf["Dir::TempPath"])
- os.chmod(path, 0644)
+ os.chmod(path, 0o644)
f = open(path, "w")
yaml.dump(transitions, f, default_flow_style=False)
return path
print "Transition source %s not in testing, transition still ongoing." % (source)
else:
current = sourceobj.version
- compare = apt_pkg.VersionCompare(current, expected)
+ compare = apt_pkg.version_compare(current, expected)
if compare < 0:
# This is still valid, the current version in database is older than
# the new version we wait for
# No package in testing
print "Transition source %s not in testing, transition still ongoing." % (source)
else:
- compare = apt_pkg.VersionCompare(sourceobj.version, expected)
+ compare = apt_pkg.version_compare(sourceobj.version, expected)
print "Apt compare says: %s" % (compare)
if compare < 0:
# This is still valid, the current version in database is older than