From 94eecdbab3ade1697a7d1b720444dcde11ae84b3 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Sun, 10 Feb 2019 15:37:18 -0200 Subject: [PATCH] Fix usage with newer ConfigParser For this, we require the external ConfigParser package on Python < 3.2 Fixes #28 --- ofxclient/config.py | 7 +------ requirements.txt | 1 + setup.py | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ofxclient/config.py b/ofxclient/config.py index 7a6757c..9b9b7f3 100644 --- a/ofxclient/config.py +++ b/ofxclient/config.py @@ -56,12 +56,7 @@ class SecurableConfigParser(ConfigParser): def __init__(self, keyring_name='ofxclient', keyring_available=KEYRING_AVAILABLE, **kwargs): - if sys.version_info >= (3,): - # python 3 - ConfigParser.__init__(self, interpolation=None) - else: - # python 2 - ConfigParser.__init__(self) + ConfigParser.__init__(self, interpolation=None) self.keyring_name = keyring_name self.keyring_available = keyring_available self._unsaved = {} diff --git a/requirements.txt b/requirements.txt index 3ac7954..6908f50 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ argparse==1.4.1; python_version < '2.7' +configparser; python_version < '3.2' beautifulsoup4==4.4.1 keyring==8.4.1 ofxhome==0.3.3 diff --git a/setup.py b/setup.py index 3b77751..b7c8768 100644 --- a/setup.py +++ b/setup.py @@ -40,6 +40,7 @@ }, install_requires=[ "argparse", + "configparser; python_version < '3.2', "keyring", "lxml", "ofxhome",