From 481f77934983284b67b7546470f52c9799bc6184 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sun, 5 Mar 2017 09:29:51 +0000 Subject: [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. --- deluge/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'deluge/log.py') 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'): -- cgit