Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f6ae743

Browse files
committed
Fix suggested by [email protected] (plus doc string by myself)
for LIST command with msg argument.
1 parent c86b7c6 commit f6ae743

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

Lib/poplib.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,17 @@ def stat(self):
196196
return (numMessages, sizeMessages)
197197

198198

199-
def list(self, which=None):
199+
def list(self, msg=None):
200200
"""Request listing, return result.
201-
Result is in form ['response', ['mesg_num octets', ...]].
202201
203-
Unsure what the optional 'msg' arg does.
202+
Result without a msg argument is in form
203+
['response', ['mesg_num octets', ...]].
204+
205+
Result when a msg argument is given is a single response:
206+
the "scan listing" for that message.
204207
"""
205208
if which:
206-
return self._longcmd('LIST %s' % which)
209+
return self._shortcmd('LIST %s' % which)
207210
return self._longcmd('LIST')
208211

209212

0 commit comments

Comments
 (0)