]> arthur.barton.de Git - bup.git/blobdiff - cmd/tag-cmd.py
tvfs: accommodate python 3 and test there
[bup.git] / cmd / tag-cmd.py
index 492c3baad833631f7248553be60d1e48ea427f16..2fc068ddc7189eb535a31def25681480fc7cc9cb 100755 (executable)
@@ -5,6 +5,7 @@ exec "$bup_python" "$0" ${1+"$@"}
 """
 # end of bup preamble
 
+from __future__ import absolute_import, print_function
 import os, sys
 
 from bup import git, options
@@ -44,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.')
@@ -78,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)