from daklib import utils
from daklib.dak_exceptions import *
from daklib.dbconn import *
+from daklib.config import Config
################################################################################
out = sys.stdout
Cnf = utils.get_conf()
+ cnf = Config()
Arguments = [('h',"help","Generate-Releases::Options::Help"),
('a',"apt-conf","Generate-Releases::Options::Apt-Conf", "HasArg"),
architectures = get_suite_architectures(suite, skipall=True, skipsrc=True)
- if SuiteBlock.has_key("NotAutomatic"):
+ if suiteobj.notautomatic:
notautomatic = "yes"
else:
notautomatic = ""
out.write("Codename: %s\n" % (codename))
out.write("Date: %s\n" % (time.strftime("%a, %d %b %Y %H:%M:%S UTC", time.gmtime(time.time()))))
- if SuiteBlock.has_key("ValidTime"):
- validtime=float(SuiteBlock["ValidTime"])
+ if suiteobj.validtime:
+ validtime=float(suiteobj.validtime)
out.write("Valid-Until: %s\n" % (time.strftime("%a, %d %b %Y %H:%M:%S UTC", time.gmtime(time.time()+validtime))))
if notautomatic != "":
keyring += " --keyring \"%s\"" % Cnf["Dinstall::SigningPubKeyring"]
arguments = "--no-options --batch --no-tty --armour"
- if Cnf.has_key("Dinstall::SigningKeyIds"):
- signkeyids = Cnf["Dinstall::SigningKeyIds"].split()
- else:
- signkeyids = [""]
+ signkeyids=cnf.signingkeyids.split()
dest = Cnf["Dir::Root"] + tree + "/Release.gpg"
if os.path.exists(dest):