summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-11-20 13:16:31 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-11-20 13:16:31 (GMT)
commit662fd5f68ef1a3bf7f4f7bbb4e50a876216424eb (patch)
treef435bf8369e007243faa453565d226e3df643572 /Lib/asyncio
parentabde2c1d2511367c6199d6bb21ec63cecb7ac6b8 (diff)
downloadcpython-662fd5f68ef1a3bf7f4f7bbb4e50a876216424eb.zip
cpython-662fd5f68ef1a3bf7f4f7bbb4e50a876216424eb.tar.gz
cpython-662fd5f68ef1a3bf7f4f7bbb4e50a876216424eb.tar.bz2
asyncio: Fix formatting of the "Future exception was never retrieved" in
release mode
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/futures.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/asyncio/futures.py b/Lib/asyncio/futures.py
index 7998fbb..40662a3 100644
--- a/Lib/asyncio/futures.py
+++ b/Lib/asyncio/futures.py
@@ -104,10 +104,11 @@ class _TracebackLogger:
def __del__(self):
if self.tb:
- msg = 'Future/Task exception was never retrieved'
+ msg = 'Future/Task exception was never retrieved\n'
if self.source_traceback:
- msg += '\nFuture/Task created at (most recent call last):\n'
- msg += ''.join(traceback.format_list(self.source_traceback))
+ src = ''.join(traceback.format_list(self.source_traceback))
+ msg += 'Future/Task created at (most recent call last):\n'
+ msg += '%s\n' % src.rstrip()
msg += ''.join(self.tb).rstrip()
self.loop.call_exception_handler({'message': msg})