mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 17:34:54 +01:00
nmbug-status: Use email.utils instead of rfc822
rfc822 has been deprecated since Python 2.3, and it's gone in Python 3 [1]. [1]: http://docs.python.org/2/library/rfc822.html
This commit is contained in:
parent
a8b81adc8e
commit
ee6b5c372f
1 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
import rfc822
|
import email.utils
|
||||||
import urllib
|
import urllib
|
||||||
import json
|
import json
|
||||||
import argparse
|
import argparse
|
||||||
|
@ -128,7 +128,7 @@ def print_view(title, query, comment):
|
||||||
val = str.join(' ', val.split(None)[1:4])
|
val = str.join(' ', val.split(None)[1:4])
|
||||||
val = str(datetime.datetime.strptime(val, '%d %b %Y').date())
|
val = str(datetime.datetime.strptime(val, '%d %b %Y').date())
|
||||||
elif header == 'from':
|
elif header == 'from':
|
||||||
(val, addr) = rfc822.parseaddr(val)
|
(val, addr) = email.utils.parseaddr(val)
|
||||||
if val == '':
|
if val == '':
|
||||||
val = addr.split('@')[0]
|
val = addr.split('@')[0]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue