summaryrefslogtreecommitdiffstats
path: root/Lib/imaplib.py
diff options
context:
space:
mode:
authorSanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>2020-06-02 01:17:45 (GMT)
committerGitHub <noreply@github.com>2020-06-02 01:17:45 (GMT)
commit8a3d2af997e3702eac4c5b012537be39ada36888 (patch)
tree4dd5ab95ff423850adce57db91b67560503c1e01 /Lib/imaplib.py
parentfe5dd78182dbf4937bcc2b113ca7526bfad0192b (diff)
downloadcpython-8a3d2af997e3702eac4c5b012537be39ada36888.zip
cpython-8a3d2af997e3702eac4c5b012537be39ada36888.tar.gz
cpython-8a3d2af997e3702eac4c5b012537be39ada36888.tar.bz2
bpo-26543: Fix IMAP4.noop when debug mode is enabled (GH-15206)
Diffstat (limited to 'Lib/imaplib.py')
-rw-r--r--Lib/imaplib.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py
index d9720f2..7318439 100644
--- a/Lib/imaplib.py
+++ b/Lib/imaplib.py
@@ -1251,13 +1251,12 @@ class IMAP4:
sys.stderr.write(' %s.%02d %s\n' % (tm, (secs*100)%100, s))
sys.stderr.flush()
- def _dump_ur(self, dict):
- # Dump untagged responses (in `dict').
- l = dict.items()
- if not l: return
- t = '\n\t\t'
- l = map(lambda x:'%s: "%s"' % (x[0], x[1][0] and '" "'.join(x[1]) or ''), l)
- self._mesg('untagged responses dump:%s%s' % (t, t.join(l)))
+ def _dump_ur(self, untagged_resp_dict):
+ if not untagged_resp_dict:
+ return
+ items = (f'{key}: {value!r}'
+ for key, value in untagged_resp_dict.items())
+ self._mesg('untagged responses dump:' + '\n\t\t'.join(items))
def _log(self, line):
# Keep log of last `_cmd_log_len' interactions for debugging.