X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fpython%2Fnotmuch.py;h=3ff53ec8c60ed6459a9eb36b03bf81e246eca838;hp=857261295d7aa63219bdefa0b130023fc5c58399;hb=4ed0362d41e62d5254be6cfb46e0c0c9fd9de0a0;hpb=8cbb5114a20c1217f23977fd5edca99a0b7a2955 diff --git a/bindings/python/notmuch.py b/bindings/python/notmuch.py index 85726129..3ff53ec8 100755 --- a/bindings/python/notmuch.py +++ b/bindings/python/notmuch.py @@ -17,7 +17,12 @@ import stat import email from notmuch import Database, Query, NotmuchError, STATUS -from ConfigParser import SafeConfigParser +try: + # python3.x + from configparser import SafeConfigParser +except ImportError: + # python2.x + from ConfigParser import SafeConfigParser from cStringIO import StringIO PREFIX = re.compile('(\w+):(.*$)') @@ -486,7 +491,6 @@ def main(): print "\n".join([t for t in msgs.collect_tags()]) #------------------------------------- elif sys.argv[1] == 'dump': - # TODO: implement "dump " if len(sys.argv) == 2: f = sys.stdout else: