[Python-modules-commits] [dulwich] 04/14: Python3: fix BytesIO call, avoid iteritems.

Jelmer Vernooij jelmer at moszumanska.debian.org
Tue Jul 5 23:27:29 UTC 2016


This is an automated email from the git hooks/post-receive script.

jelmer pushed a commit to branch master
in repository dulwich.

commit 1abf2d3872dd5ad0087392bfd2db95c028449719
Author: Jelmer Vernooij <jelmer at jelmer.uk>
Date:   Tue Jul 5 22:09:04 2016 +0000

    Python3: fix BytesIO call, avoid iteritems.
---
 dulwich/contrib/swift.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dulwich/contrib/swift.py b/dulwich/contrib/swift.py
index 0fb15e9..120664b 100644
--- a/dulwich/contrib/swift.py
+++ b/dulwich/contrib/swift.py
@@ -211,7 +211,7 @@ def pack_info_create(pack_data, pack_index):
         # Tree
         elif obj.type_num == Tree.type_num:
             shas = [(s, n, not stat.S_ISDIR(m)) for
-                    n, m, s in obj.iteritems() if not S_ISGITLINK(m)]
+                    n, m, s in obj.items() if not S_ISGITLINK(m)]
             info[obj.id] = (obj.type_num, shas)
         # Blob
         elif obj.type_num == Blob.type_num:
@@ -849,7 +849,7 @@ class SwiftInfoRefsContainer(InfoRefsContainer):
         self.store = store
         f = self.scon.get_object(self.filename)
         if not f:
-            f = BytesIO('')
+            f = BytesIO(b'')
         super(SwiftInfoRefsContainer, self).__init__(f)
 
     def _load_check_ref(self, name, old_ref):
@@ -951,7 +951,7 @@ class SwiftRepo(BaseRepo):
         scon.create_root()
         for obj in [posixpath.join(OBJECTDIR, PACKDIR),
                     posixpath.join(INFODIR, 'refs')]:
-            scon.put_object(obj, BytesIO(''))
+            scon.put_object(obj, BytesIO(b''))
         ret = cls(scon.root, conf)
         ret._init_files(True)
         return ret

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/dulwich.git



More information about the Python-modules-commits mailing list