diff options
Diffstat (limited to 'bm')
-rwxr-xr-x | bm | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -123,13 +123,13 @@ def parse_options(): dir = tmpdir break else: - raise Error, "couldn't guess SPECS directory" + raise Error("couldn't guess SPECS directory") filelist = os.listdir(dir) for file in filelist[:]: if file[-5:] != ".spec": filelist.remove(file) if len(filelist) != 1: - raise Error, "couldn't guess spec file in "+dir + raise Error("couldn't guess spec file in "+dir) opts.args = [os.path.join(dir, filelist[0])] else: # Detect directories with a SPECS/ directory inside it @@ -141,7 +141,7 @@ def parse_options(): if file[-5:] != ".spec": filelist.remove(file) if len(filelist) != 1: - raise Error, "couldn't guess spec file in "+specsdir + raise Error("couldn't guess spec file in "+specsdir) opts.args[i] = os.path.join(specsdir, filelist[0]) opts.filter_renew = [y for x in opts.filter_renew @@ -165,8 +165,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("_", "-")) old_ignore = opts.ignore opts.ignore = [] @@ -186,7 +186,7 @@ def main(): logger.debug("starting bm") builder = PackageBuilder(opts) status = builder.run() - except Error, e: + except Error as e: logger.error(str(e)) logger.debug("finishing bm with error") sys.exit(1) |