[elbe-devel] [PATCH v3] py3: remove usage of long variables

Manuel Traut manut at linutronix.de
Mon Dec 18 15:30:12 CET 2017


long is no longer available in py3, replace it by integer

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 elbepack/aptprogress.py | 4 ++--
 elbepack/ziparchives.py | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/elbepack/aptprogress.py b/elbepack/aptprogress.py
index d804710f..bd298e95 100644
--- a/elbepack/aptprogress.py
+++ b/elbepack/aptprogress.py
@@ -70,7 +70,7 @@ class ElbeAcquireProgress (AcquireProgress):
 
     def __init__ (self, cb=None):
         AcquireProgress.__init__ (self)
-        self._id = long(1)
+        self._id = 1
         self.cb = cb
 
     def write (self, line):
@@ -108,7 +108,7 @@ class ElbeOpProgress (OpProgress):
 
     def __init__ (self, cb=None):
         OpProgress.__init__ (self)
-        self._id = long(1)
+        self._id = 1
         self.cb = cb
 
     def write (self, line):
diff --git a/elbepack/ziparchives.py b/elbepack/ziparchives.py
index af5ee931..4c245ff5 100644
--- a/elbepack/ziparchives.py
+++ b/elbepack/ziparchives.py
@@ -35,7 +35,7 @@ def create_zip_archive( zipfilename, path, inarchpath ):
                     archname = archname[2:]
                 zi = ZipInfo( archname)
                 stat = os.stat( path + '/' + archname )
-                zi.external_attr = stat.st_mode << 16L
+                zi.external_attr = stat.st_mode << 16
                 # this hack is needed to use the external attributes
                 # there is no way to set a zipinfo object directly to an archive
                 with open (filename, 'rb') as f:
-- 
2.15.1




More information about the elbe-devel mailing list