From: Joerg Jaspert Date: Thu, 10 Sep 2015 20:07:55 +0000 (+0200) Subject: Merge remote-tracking branch 'lamby/misc-fixes-796786' into merge X-Git-Url: https://git.decadent.org.uk/gitweb/?p=dak.git;a=commitdiff_plain;h=e3072cd35534e3807eb6e884b06e7fdea8a81b44;hp=9d77b10ef77da44cf458cc808c323c253b9b8c80 Merge remote-tracking branch 'lamby/misc-fixes-796786' into merge * lamby/misc-fixes-796786: daklib/utils.py: mandantory -> mandatory spelling error daliblib/dak_exceptions: Add trailing comma to avoid future VCS noise tests/test_packagelist.py: make executable dalkib/dbconn.py: Mention which version is installed in sqlalchemy check dak/copy_installer.py: Include which directory doesn't exist in exception --- diff --git a/dak/copy_installer.py b/dak/copy_installer.py index c70b048d..2e8a0487 100755 --- a/dak/copy_installer.py +++ b/dak/copy_installer.py @@ -92,7 +92,7 @@ class InstallerCopier: def check_dir(self, dir, message): if not os.path.isdir(dir): - raise IOError(message) + raise IOError("%s (%s)" % (message, dir)) def check_architecture(self, arch_dir): architecture = re.sub('.*?/installer-(.*?)/.*', r'\1', arch_dir) diff --git a/daklib/dak_exceptions.py b/daklib/dak_exceptions.py index ef24fd75..e111afdd 100644 --- a/daklib/dak_exceptions.py +++ b/daklib/dak_exceptions.py @@ -62,7 +62,7 @@ dakerrors = { "DBUpdateError": """Exception raised - could not update the database""", "ChangesUnicodeError": """Exception raised - changes file not properly utf-8 encoded""", "AlreadyLockedError": """Exception raised - package already locked by someone else""", - "CantGetLockError": """Exception raised - lockfile already in use""" + "CantGetLockError": """Exception raised - lockfile already in use""", } #: All dak exceptions def construct_dak_exception(name, description): diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 2d10eff3..e762ef72 100644 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -113,7 +113,7 @@ if sa_major_version in ["0.5", "0.6", "0.7", "0.8", "0.9"]: from sqlalchemy.databases import postgres postgres.ischema_names['debversion'] = DebVersion else: - raise Exception("dak only ported to SQLA versions 0.5 to 0.9. See daklib/dbconn.py") + raise Exception("dak only ported to SQLA versions 0.5 to 0.9 (%s installed). See daklib/dbconn.py" % sa_major_version) ################################################################################ diff --git a/daklib/utils.py b/daklib/utils.py index 2cf6871c..518d66e9 100644 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -276,7 +276,7 @@ def parse_changes(filename, signing_rules=0, dsc_file=0, keyrings=None): missingfields.append(keyword) if len(missingfields): - raise ParseChangesError("Missing mandantory field(s) in changes file (policy 5.5): %s" % (missingfields)) + raise ParseChangesError("Missing mandatory field(s) in changes file (policy 5.5): %s" % (missingfields)) return changes diff --git a/tests/test_packagelist.py b/tests/test_packagelist.py old mode 100644 new mode 100755