Changeset 195:f9d8c6ff0784 for imapclient
- Timestamp:
- 01/14/11 13:42:24 (16 months ago)
- Branch:
- default
- Location:
- imapclient
- Files:
-
- 3 modified
-
imapclient.py (modified) (2 diffs)
-
response_parser.py (modified) (1 diff)
-
test/test_response_parser.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
imapclient/imapclient.py
r194 r195 508 508 self._checkok('fetch', typ, data) 509 509 typ, data = self._imap._untagged_response(typ, data, 'FETCH') 510 # appears to be a special case - no 'untagged' responses (ie, no511 # folders) results in [None]512 if data == [None]:513 return {}514 515 510 return parse_fetch_response(data) 516 511 … … 638 633 typ, data = self._imap.store(msg_list, cmd, flag_list) 639 634 self._checkok('store', typ, data) 640 641 635 return self._flatten_dict(parse_fetch_response((data))) 642 636 -
imapclient/response_parser.py
r185 r195 50 50 keyed by FETCH field type (eg."RFC822"). 51 51 """ 52 if text == [None]: 53 return {} 52 54 response = gen_parsed_response(text) 53 55 -
imapclient/test/test_response_parser.py
r183 r195 205 205 206 206 207 def test_none_special_case(self): 208 self.assertEquals(parse_fetch_response([None]), {}) 209 210 207 211 def test_bad_msgid(self): 208 212 self.assertRaises(ParseError, parse_fetch_response, ['abc ()'])
