diff options
author | Calum Lind <calumlind@gmail.com> | 2017-03-05 09:29:51 +0000 |
---|---|---|
committer | Calum Lind <calumlind@gmail.com> | 2017-06-05 22:25:29 +0100 |
commit | 481f77934983284b67b7546470f52c9799bc6184 (patch) | |
tree | 6efeac6d6c038809f989385ec2e743ede0b2a4e1 /deluge/log.py | |
parent | ede0f710f814c62f9e6625c7b166fb7b1fcf5942 (diff) | |
download | deluge-481f77934983284b67b7546470f52c9799bc6184.tar.gz deluge-481f77934983284b67b7546470f52c9799bc6184.tar.bz2 deluge-481f77934983284b67b7546470f52c9799bc6184.zip |
[Python3] Fixes to make code backward compatible
* Continuation of updating code to Python 3 with Python 2 fallback.
* Using io.open allows files to be encoded and decoded automatically on write and read. This
maintains the python boundaries of unicode in code and bytes for output/files so less
explicit encoding or decoding.
* io.StringIO is the replacement for StringIO and will only accept unicode strings.
* io.BytesIO is used where bytes output is required by the enclosing method.
* Update bencode for full compatibility.
Diffstat (limited to 'deluge/log.py')
-rw-r--r-- | deluge/log.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/deluge/log.py b/deluge/log.py index 003c1be8a..bbf57f73f 100644 --- a/deluge/log.py +++ b/deluge/log.py @@ -82,7 +82,7 @@ class Logging(LoggingLoggerClass): def exception(self, msg, *args, **kwargs): yield LoggingLoggerClass.exception(self, msg, *args, **kwargs) - def findCaller(self): # NOQA: N802 + def findCaller(self, stack_info=False): # NOQA: N802 f = logging.currentframe().f_back rv = '(unknown file)', 0, '(unknown function)' while hasattr(f, 'f_code'): |