diff --git a/mopidy/commands.py b/mopidy/commands.py index a5d821b4..c5ca0236 100644 --- a/mopidy/commands.py +++ b/mopidy/commands.py @@ -13,7 +13,9 @@ def config_files_type(value): def config_override_type(value): try: - return config_lib.parse_override(value) + section, remainder = value.split(b'/', 1) + key, value = remainder.split(b'=', 1) + return (section.strip(), key.strip(), value.strip()) except ValueError: raise argparse.ArgumentTypeError( '%s must have the format section/key=value' % value) diff --git a/mopidy/config/__init__.py b/mopidy/config/__init__.py index e4723b15..0d9b9e7a 100644 --- a/mopidy/config/__init__.py +++ b/mopidy/config/__init__.py @@ -140,13 +140,6 @@ def _format(config, comments, schemas, display): return b'\n'.join(output) -def parse_override(override): - """Parse ``section/key=value`` command line overrides""" - section, remainder = override.split(b'/', 1) - key, value = remainder.split(b'=', 1) - return (section.strip(), key.strip(), value.strip()) - - class Proxy(collections.Mapping): def __init__(self, data): self._data = data