[elbe-devel] [PATCH 11/25] py3: remove usage of long variables

Manuel Traut manut at linutronix.de
Fri Dec 1 16:51:08 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 009a11bc..d3b09436 100644
--- a/elbepack/aptprogress.py
+++ b/elbepack/aptprogress.py
@@ -68,7 +68,7 @@ class ElbeAcquireProgress (AcquireProgress):
 
     def __init__ (self, cb=None):
         AcquireProgress.__init__ (self)
-        self._id = long(1)
+        self._id = int(1)
         self.cb = cb
 
     def write (self, line):
@@ -106,7 +106,7 @@ class ElbeOpProgress (OpProgress):
 
     def __init__ (self, cb=None):
         OpProgress.__init__ (self)
-        self._id = long(1)
+        self._id = int(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