config: Fix review comments.
This commit is contained in:
parent
7dbabd1960
commit
774e629425
@ -43,13 +43,14 @@ _schemas = [_logging_schema, _loglevels_schema, _audio_schema, _proxy_schema]
|
||||
|
||||
_INITIAL_HELP = """
|
||||
# For further information about options in this file see:
|
||||
# http://docs.mopidy.com/en/latest/config/
|
||||
# http://docs.mopidy.com/
|
||||
#
|
||||
# The initial commented out values reflect the defaults as of:
|
||||
# %(versions)s
|
||||
#
|
||||
# Available options and defaults might have changed since then,
|
||||
# run `mopidy config` to see the current effective config.
|
||||
# run `mopidy config` to see the current effective config and
|
||||
# `mopidy --version` to check the current version.
|
||||
"""
|
||||
|
||||
|
||||
@ -175,7 +176,7 @@ def _format(config, comments, schemas, display, disable):
|
||||
if disable:
|
||||
output[-1] = re.sub(r'^', b'#', output[-1], flags=re.M)
|
||||
output.append(b'')
|
||||
return b'\n'.join(output[:-1]).strip()
|
||||
return b'\n'.join(output).strip()
|
||||
|
||||
|
||||
def _preprocess(config_string):
|
||||
|
||||
@ -119,7 +119,7 @@ class GetOrCreateFileTest(unittest.TestCase):
|
||||
with self.assertRaises(IOError):
|
||||
path.get_or_create_file(file_path, mkdir=False)
|
||||
|
||||
def test_create_dir_with_defualt_content(self):
|
||||
def test_create_dir_with_default_content(self):
|
||||
file_path = os.path.join(self.parent, b'test')
|
||||
created = path.get_or_create_file(file_path, content=b'foobar')
|
||||
with open(created) as fh:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user