diff options
author | nicolargo <nicolas@nicolargo.com> | 2021-01-10 16:33:07 +0100 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2021-01-10 16:33:07 +0100 |
commit | f22c3d4f34044cb2677575430fed4f2e069367bc (patch) | |
tree | dbdd97cee7d25d4678e4d17ccbe2ec22779543d0 | |
parent | 5330d0307703ae471508147a85065449afeb26ee (diff) |
The last PR break the compatibilty with Python 2
-rw-r--r-- | glances/config.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/glances/config.py b/glances/config.py index 7c79958d..e131ad7e 100644 --- a/glances/config.py +++ b/glances/config.py @@ -107,7 +107,11 @@ class Config(object): # Re patern for optimize research of `foo` self.re_pattern = re.compile(r'(\`.+?\`)') - self.parser = ConfigParser(interpolation=None) + try: + self.parser = ConfigParser(interpolation=None) + except TypeError: + self.parser = ConfigParser() + self.read() def config_file_paths(self): |