1 Return-Path: <teythoon@jade-hamburg.de>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id C89EC429E38
\r
6 for <notmuch@notmuchmail.org>; Wed, 14 Dec 2011 02:58:57 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id E040OfF5KqZD for <notmuch@notmuchmail.org>;
\r
16 Wed, 14 Dec 2011 02:58:56 -0800 (PST)
\r
17 Received: from mail.cryptobitch.de (cryptobitch.de [88.198.7.68])
\r
18 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id D3A78429E34
\r
21 for <notmuch@notmuchmail.org>; Wed, 14 Dec 2011 02:58:54 -0800 (PST)
\r
22 Received: from mail.jade-hamburg.de (unknown [85.183.11.228])
\r
23 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
\r
24 (No client certificate requested)
\r
25 by mail.cryptobitch.de (Postfix) with ESMTPSA id 85C1550F614
\r
26 for <notmuch@notmuchmail.org>; Wed, 14 Dec 2011 11:58:53 +0100 (CET)
\r
27 Received: by mail.jade-hamburg.de (Postfix, from userid 401)
\r
28 id BFD13DF2A0; Wed, 14 Dec 2011 11:58:52 +0100 (CET)
\r
29 Received: from thinkbox.jade-hamburg.de (unknown [85.183.11.228])
\r
30 (using TLSv1 with cipher AES256-SHA (256/256 bits))
\r
31 (No client certificate requested) (Authenticated sender: teythoon)
\r
32 by mail.jade-hamburg.de (Postfix) with ESMTPSA id 44F04DF2A1;
\r
33 Wed, 14 Dec 2011 11:58:47 +0100 (CET)
\r
34 Received: from teythoon by thinkbox.jade-hamburg.de with local (Exim 4.77)
\r
35 (envelope-from <teythoon@thinkbox.jade-hamburg.de>)
\r
36 id 1RamXr-0004MV-Fb; Wed, 14 Dec 2011 11:58:43 +0100
\r
37 From: Justus Winter <4winter@informatik.uni-hamburg.de>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: [PATCH 2/7] py3k: The ConfigParser module has been renamed to
\r
41 Date: Wed, 14 Dec 2011 11:58:20 +0100
\r
43 <1323860305-15802-3-git-send-email-4winter@informatik.uni-hamburg.de>
\r
44 X-Mailer: git-send-email 1.7.7.3
\r
46 <1323860305-15802-1-git-send-email-4winter@informatik.uni-hamburg.de>
\r
48 <1323860305-15802-1-git-send-email-4winter@informatik.uni-hamburg.de>
\r
49 X-BeenThere: notmuch@notmuchmail.org
\r
50 X-Mailman-Version: 2.1.13
\r
52 List-Id: "Use and development of the notmuch mail system."
\r
53 <notmuch.notmuchmail.org>
\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
57 List-Post: <mailto:notmuch@notmuchmail.org>
\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
61 X-List-Received-Date: Wed, 14 Dec 2011 10:58:58 -0000
\r
64 bindings/python/notmuch.py | 7 ++++++-
\r
65 bindings/python/notmuch/database.py | 8 +++++++-
\r
66 2 files changed, 13 insertions(+), 2 deletions(-)
\r
68 diff --git a/bindings/python/notmuch.py b/bindings/python/notmuch.py
\r
69 index 8d11859..3ff53ec 100755
\r
70 --- a/bindings/python/notmuch.py
\r
71 +++ b/bindings/python/notmuch.py
\r
72 @@ -17,7 +17,12 @@ import stat
\r
75 from notmuch import Database, Query, NotmuchError, STATUS
\r
76 -from ConfigParser import SafeConfigParser
\r
79 + from configparser import SafeConfigParser
\r
80 +except ImportError:
\r
82 + from ConfigParser import SafeConfigParser
\r
83 from cStringIO import StringIO
\r
85 PREFIX = re.compile('(\w+):(.*$)')
\r
86 diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py
\r
87 index 7923f76..9318368 100644
\r
88 --- a/bindings/python/notmuch/database.py
\r
89 +++ b/bindings/python/notmuch/database.py
\r
90 @@ -543,7 +543,13 @@ class Database(object):
\r
91 """ Reads a user's notmuch config and returns his db location
\r
93 Throws a NotmuchError if it cannot find it"""
\r
94 - from ConfigParser import SafeConfigParser
\r
97 + from configparser import SafeConfigParser
\r
98 + except ImportError:
\r
100 + from ConfigParser import SafeConfigParser
\r
102 config = SafeConfigParser()
\r
103 conf_f = os.getenv('NOTMUCH_CONFIG',
\r
104 os.path.expanduser('~/.notmuch-config'))
\r