]> arthur.barton.de Git - bup.git/blobdiff - cmd/tag-cmd.py
vint: remove unnecessary condition
[bup.git] / cmd / tag-cmd.py
index 00647b973ba3f1e3cbc8fb4595b905c951ff64f6..2fc068ddc7189eb535a31def25681480fc7cc9cb 100755 (executable)
@@ -5,7 +5,7 @@ exec "$bup_python" "$0" ${1+"$@"}
 """
 # end of bup preamble
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 import os, sys
 
 from bup import git, options
@@ -45,7 +45,7 @@ if opt.delete:
 
 if not extra:
     for t in tags:
-        print t
+        print(t)
     sys.exit(0)
 elif len(extra) < 2:
     o.fatal('no commit ref or hash given.')
@@ -79,7 +79,7 @@ if not pL.exists(hash):
 
 tag_file = git.repo('refs/tags/%s' % tag_name)
 try:
-    tag = file(tag_file, 'w')
+    tag = open(tag_file, 'w')
 except OSError as e:
     log("bup: error: could not create tag '%s': %s" % (tag_name, e))
     sys.exit(3)