diff options
author | Nitzo <nitzo2001@yahoo.com> | 2016-02-09 23:20:52 +0100 |
---|---|---|
committer | Nitzo <nitzo2001@yahoo.com> | 2016-02-09 23:20:52 +0100 |
commit | 3d4d09884316a45d0ef188744c6b98b2b3384e4a (patch) | |
tree | f5f6ecc1f3d21ae6521f87f292067ab8233d47f0 | |
parent | [XFSHoster] fix #2333 (diff) | |
download | pyload-3d4d09884316a45d0ef188744c6b98b2b3384e4a.tar.xz |
[misc] format_exc(): use decode() function
-rw-r--r-- | module/plugins/internal/misc.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/internal/misc.py b/module/plugins/internal/misc.py index 6f3dd546e..d49896233 100644 --- a/module/plugins/internal/misc.py +++ b/module/plugins/internal/misc.py @@ -38,7 +38,7 @@ except ImportError: class misc(object): __name__ = "misc" __type__ = "plugin" - __version__ = "0.26" + __version__ = "0.27" __status__ = "stable" __pattern__ = r'^unmatchable$' @@ -655,7 +655,7 @@ def format_exc(frame=None): Format call-stack and display exception information (if availible) """ exc_info = sys.exc_info() - exc_desc = "" + exc_desc = u"" callstack = traceback.extract_stack(frame) callstack = callstack[:-1] @@ -666,10 +666,10 @@ def format_exc(frame=None): if callstack[-1][0] == exception_callstack[0][0]: #@NOTE: Does this exception belongs to us? callstack = callstack[:-1] callstack.extend(exception_callstack) - exc_desc = "".join(traceback.format_exception_only(exc_info[0], exc_info[1])) + exc_desc = decode("".join(traceback.format_exception_only(exc_info[0], exc_info[1]))) - msg = "Traceback (most recent call last):\n" - msg += "".join(traceback.format_list(callstack)) + msg = u"Traceback (most recent call last):\n" + msg += decode("".join(traceback.format_list(callstack))) msg += exc_desc return msg |