diff --git a/bazarr/config.py b/bazarr/config.py index deea48731..ca61871e0 100644 --- a/bazarr/config.py +++ b/bazarr/config.py @@ -5,6 +5,7 @@ import os from simpleconfigparser import simpleconfigparser from get_args import args +from six import PY3 defaults = { 'general': { @@ -139,7 +140,10 @@ defaults = { } } -settings = simpleconfigparser(defaults=defaults) +if PY3: + settings = simpleconfigparser(defaults=defaults, interpolation=None) +else: + settings = simpleconfigparser(defaults=defaults) settings.read(os.path.join(args.config_dir, 'config', 'config.ini')) base_url = settings.general.base_url diff --git a/libs/simpleconfigparser/__init__.py b/libs/simpleconfigparser/__init__.py index 9cce999b9..c84ccbacc 100644 --- a/libs/simpleconfigparser/__init__.py +++ b/libs/simpleconfigparser/__init__.py @@ -26,7 +26,7 @@ THE SOFTWARE. try: from configparser import ConfigParser as configparser, NoOptionError, NoSectionError except ImportError: - from ConfigParser import SafeConfigParser as configparser, NoOptionError, NoSectionError + from ConfigParser import RawConfigParser as configparser, NoOptionError, NoSectionError class simpleconfigparser(configparser): @@ -126,6 +126,6 @@ class simpleconfigparser(configparser): def get(self, section, option, raw=False, vars=None, fallback=None): try: # Strip out quotes from the edges - return configparser.get(self, section, option, raw=raw, vars=vars).strip('"\'') + return configparser.get(self, section, option).strip('"\'') except NoOptionError: return None