Use six.StringIO
authorGuido Günther <agx@sigxcpu.org>
Thu, 19 Feb 2015 11:32:22 +0000 (12:32 +0100)
committerGuido Günther <agx@sigxcpu.org>
Fri, 20 Feb 2015 11:43:06 +0000 (12:43 +0100)
to work towards Python3 support

Gbp-Dch: Ignore

gbp/git/vfs.py
tests/testutils/gbplogtester.py

index d6f9f4d8d9e51e26bfdc6786aba6934019bc7eff..b2c0f4543d71093640ca23b440f497059f95584c 100644 (file)
@@ -16,7 +16,7 @@
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 """Make blobs in a git repository accessible as file like objects"""
 
-import StringIO
+from six import StringIO
 from  gbp.git.repository import GitRepositoryError
 
 class GitVfs(object):
@@ -29,7 +29,7 @@ class GitVfs(object):
         """
         def __init__(self, content):
             self._iter = iter
-            self._data = StringIO.StringIO(content)
+            self._data = StringIO(content)
 
         def readline(self):
             return self._data.readline()
index 20b522d6898da23662db116a85265bbe12baef8d..ee50d1824704bed3fe2b079c659dd18f7fecf486 100644 (file)
@@ -1,7 +1,7 @@
 # vim: set fileencoding=utf-8 :
 
 import re
-from StringIO import StringIO
+from six import StringIO
 from nose.tools import eq_, ok_     # pylint: disable=E0611
 
 import gbp.log