[elbe-devel] [PATCH v3] py3: remove usage of long variables
Torben Hohn
torben.hohn at linutronix.de
Mon Dec 18 16:54:20 CET 2017
On Mon, Dec 18, 2017 at 03:30:12PM +0100, Manuel Traut wrote:
> long is no longer available in py3, replace it by integer
>
> Signed-off-by: Manuel Traut <manut at linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn 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
>
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
--
Mit freundlichen Grüßen
Torben Hohn
Linutronix GmbH
Standort: Bremen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
Firmensitz / Registered Office: D-88690 Uhldingen, Bahnhofstr. 3
Registergericht / Local District Court: Amtsgericht Freiburg i. Br.; HRB
Nr. / Trade register no.: 700 806
Geschäftsführer / Managing Directors: Heinz Egger, Thomas Gleixner
Eine Bitte von uns: Sollten Sie diese E-Mail irrtümlich erhalten haben,
benachrichtigen Sie uns in diesem Falle bitte sobald wie es Ihnen
möglich ist, durch Antwort-Mail. Vielen Dank!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20171218/52363c70/attachment.sig>
More information about the elbe-devel
mailing list