summaryrefslogtreecommitdiffstats
path: root/bmclean
diff options
context:
space:
mode:
authorSARL ENR 68 <david@david.david>2015-09-10 07:43:50 +0200
committerSARL ENR 68 <david@david.david>2015-09-10 07:43:50 +0200
commite817a09cece47d553f1554c5c3d86db4ec7f780d (patch)
tree4f13a62ce9737077603305544b599bb0dbbecd3e /bmclean
parentfb08397fe3cc9204de67beea993d21c866b2161b (diff)
downloadbm-e817a09cece47d553f1554c5c3d86db4ec7f780d.tar
bm-e817a09cece47d553f1554c5c3d86db4ec7f780d.tar.gz
bm-e817a09cece47d553f1554c5c3d86db4ec7f780d.tar.bz2
bm-e817a09cece47d553f1554c5c3d86db4ec7f780d.tar.xz
bm-e817a09cece47d553f1554c5c3d86db4ec7f780d.zip
Adaptation to python3 using 2to3-3.4
- by papoteur
Diffstat (limited to 'bmclean')
-rwxr-xr-xbmclean10
1 files changed, 5 insertions, 5 deletions
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)