mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Fix #158
This commit is contained in:
parent
7bb7191526
commit
b03e9fb21f
1 changed files with 3 additions and 3 deletions
|
|
@ -89,7 +89,7 @@ def validate_section_name(name, section_type):
|
||||||
invalid = set(name) - SECTION_NAME_CHARS
|
invalid = set(name) - SECTION_NAME_CHARS
|
||||||
if invalid:
|
if invalid:
|
||||||
chars_display = ''.join(sorted(SECTION_NAME_CHARS))
|
chars_display = ''.join(sorted(SECTION_NAME_CHARS))
|
||||||
raise CliError('The {}-section {!r} contains invalid characters. Only '
|
raise CliError('The {}-section "{}" contains invalid characters. Only '
|
||||||
'the following characters are allowed for storage and '
|
'the following characters are allowed for storage and '
|
||||||
'pair names:\n{}'.format(section_type, name,
|
'pair names:\n{}'.format(section_type, name,
|
||||||
chars_display))
|
chars_display))
|
||||||
|
|
@ -495,7 +495,7 @@ def parse_config_value(value):
|
||||||
#
|
#
|
||||||
# foo = bar
|
# foo = bar
|
||||||
# # my comment
|
# # my comment
|
||||||
raise ValueError('No multiline-values allowed:\n{!r}'.format(value))
|
raise ValueError('No multiline-values allowed:\n{}'.format(value))
|
||||||
|
|
||||||
return rv
|
return rv
|
||||||
|
|
||||||
|
|
@ -505,7 +505,7 @@ def parse_options(items, section=None):
|
||||||
try:
|
try:
|
||||||
yield key, parse_config_value(value)
|
yield key, parse_config_value(value)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
raise ValueError('Section {!r}, option {!r}: {}'
|
raise ValueError('Section "{}", option "{}": {}'
|
||||||
.format(section, key, e))
|
.format(section, key, e))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue