Mercurial > kallithea
changeset 8174:ebc21c229371
py3: drop support for long - just use int instead
From 2to3 long.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 25 Nov 2019 00:15:45 +0100 |
parents | aa6f17a53b49 |
children | d1f091d4b765 |
files | kallithea/lib/vcs/subprocessio.py kallithea/model/db.py |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/vcs/subprocessio.py Sat Nov 23 22:08:18 2019 +0100 +++ b/kallithea/lib/vcs/subprocessio.py Mon Nov 25 00:15:45 2019 +0100 @@ -44,7 +44,7 @@ if type(source) in (type(''), bytes, bytearray): # string-like self.bytes = bytes(source) else: # can be either file pointer or file-like - if type(source) in (int, long): # file pointer it is + if isinstance(source, int): # file pointer it is # converting file descriptor (int) stdin into file-like source = os.fdopen(source, 'rb', 16384) # let's see if source is file-like by now
--- a/kallithea/model/db.py Sat Nov 23 22:08:18 2019 +0100 +++ b/kallithea/model/db.py Mon Nov 25 00:15:45 2019 +0100 @@ -139,7 +139,7 @@ return None if isinstance(value, cls): return value - if isinstance(value, (int, long)): + if isinstance(value, int): return cls.get(value) if isinstance(value, basestring) and value.isdigit(): return cls.get(int(value))