From e817a09cece47d553f1554c5c3d86db4ec7f780d Mon Sep 17 00:00:00 2001 From: SARL ENR 68 Date: Thu, 10 Sep 2015 07:43:50 +0200 Subject: Adaptation to python3 using 2to3-3.4 - by papoteur --- bmclean | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bmclean') diff --git a/bmclean b/bmclean index bddb60d..8c9426a 100755 --- a/bmclean +++ b/bmclean @@ -32,7 +32,7 @@ def parse_options(): opts.args = args if not opts.args: - raise Error, "you must specify one or more files to process" + raise Error("you must specify one or more files to process") actions = 0 if opts.remove: @@ -43,7 +43,7 @@ def parse_options(): actions += 1 if actions > 1: - raise Error, "you can't specify more than one action to perform" + raise Error("you can't specify more than one action to perform") for attr in ["move", "copy", "check"]: attrval = getattr(opts, attr) @@ -57,8 +57,8 @@ def parse_options(): if attrval and not os.path.isdir(attrval): error = True if error: - raise Error, "value of --%s must be a directory" \ - % attr.replace("_", "-") + raise Error("value of --%s must be a directory" \ + % attr.replace("_", "-")) return opts @@ -72,7 +72,7 @@ def main(): logger.debug("starting bmclean") cleaner = PackageCleaner(opts) status = cleaner.run() - except Error, e: + except Error as e: logger.error(str(e)) logger.debug("finishing bmclean with error") sys.exit(1) -- cgit v1.2.1