This commit is contained in:
René Jochum 2019-08-09 20:38:36 +02:00
parent 590ba91362
commit 11d5af59df
No known key found for this signature in database
GPG Key ID: 9E8B1C32F5F318A9
2 changed files with 19 additions and 14 deletions

View File

@ -30,6 +30,8 @@ def cli():
is_help_cmd = '-h' in sys.argv or '--help' in sys.argv
rcfile = os.path.expanduser(TITWSYNCRC)
if os.path.exists(rcfile):
with open(rcfile, 'r') as stream:
config = yaml.safe_load(stream)

View File

@ -44,6 +44,9 @@ def tw_priority_to_ti(priority):
def maybe_quote_ws(value):
"""Surrounds a value with single quotes if it contains whitespace. """
if value is None:
return value
if any(x == ' ' or x == '\t' for x in value):
return "'" + value + "'"
return value