]> arthur.barton.de Git - bup.git/commitdiff
Update file() calls to open() for py3
authorJulien Goodwin <jgoodwin@studio442.com.au>
Thu, 30 Aug 2018 10:35:32 +0000 (20:35 +1000)
committerRob Browning <rlb@defaultvalue.org>
Sun, 2 Sep 2018 20:46:46 +0000 (15:46 -0500)
Signed-off-by: Julien Goodwin <jgoodwin@studio442.com.au>
[rlb@defaultvalue.org: adjust commit message]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
cmd/tag-cmd.py
lib/bup/t/tindex.py

index 4e09870856adafb0894c1f7c2fd612e9eeb7c947..2fc068ddc7189eb535a31def25681480fc7cc9cb 100755 (executable)
@@ -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)
index 15be26627776598b02d763a85da2a91a5c666202..0314e183062208de1e6619a67b64bdab7abd4bce 100644 (file)
@@ -72,7 +72,7 @@ def index_negative_timestamps():
         with test_tempdir('bup-tindex-') as tmpdir:
             # Makes 'foo' exist
             foopath = tmpdir + '/foo'
-            f = file(foopath, 'wb')
+            f = open(foopath, 'wb')
             f.close()
 
             # Dec 31, 1969