Readded rtime is None check

This commit is contained in:
Julius Gonsior 2018-02-25 19:02:37 +01:00
parent 3643593dbb
commit 94a1991573
No known key found for this signature in database
GPG Key ID: B1A454C66015B27E
1 changed files with 5 additions and 4 deletions

View File

@ -537,11 +537,12 @@ class IMAPFolder(BaseFolder):
# if config parameter is set respect this setting:
# for the default value we don't need to change anything
internal_date_for_append_method = self.repository.getconf('internal_date_for_append_method', 'timestamp')
if internal_date_for_append_method == 'imap':
return None
elif internal_date_for_append_method == 'header':
if rtime is None or internal_date_for_append_method == 'header':
rtime = emailutil.get_message_date(content)
if internal_date_for_append_method == 'imap' or rtime == None:
return None
datetuple = time.localtime(rtime)