]> arthur.barton.de Git - bup.git/blobdiff - cmd/tag-cmd.py
Use Python 3 compatible "except ... as e" syntax
[bup.git] / cmd / tag-cmd.py
index f12ea4e473a4349cf13b24f19c087a30be8ca2a5..f065904d78397c3c66e34a988f2bf560b866f621 100755 (executable)
@@ -64,7 +64,7 @@ if tag_name.startswith('.'):
 
 try:
     hash = git.rev_parse(commit)
-except git.GitError, e:
+except git.GitError as e:
     log("bup: error: %s" % e)
     sys.exit(2)
 
@@ -80,7 +80,7 @@ if not pL.exists(hash):
 tag_file = git.repo('refs/tags/%s' % tag_name)
 try:
     tag = file(tag_file, 'w')
-except OSError, e:
+except OSError as e:
     log("bup: error: could not create tag '%s': %s" % (tag_name, e))
     sys.exit(3)