X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=bindings%2Fpython%2Fnotmuch%2Fcompat.py;h=4a94e05c805d1a9fc28d035fbde09f3b404ff202;hb=HEAD;hp=daa268c12cfb2de49a796d2f70c074498c220ff8;hpb=a5c1536d9a631f15c74602ef12a0867d278a7af0;p=notmuch diff --git a/bindings/python/notmuch/compat.py b/bindings/python/notmuch/compat.py index daa268c1..4a94e05c 100644 --- a/bindings/python/notmuch/compat.py +++ b/bindings/python/notmuch/compat.py @@ -16,7 +16,7 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with notmuch. If not, see . +along with notmuch. If not, see . Copyright 2010 Sebastian Spaeth Copyright 2012 Justus Winter <4winter@informatik.uni-hamburg.de> @@ -47,7 +47,10 @@ if sys.version_info[0] == 2: return value else: - from configparser import SafeConfigParser + from configparser import ConfigParser as SafeConfigParser + + if not hasattr(SafeConfigParser, 'readfp'): # py >= 3.12 + SafeConfigParser.readfp = SafeConfigParser.read_file class Python3StringMixIn(object): def __str__(self):