Rev3524, Fix saving for single line config values

This commit is contained in:
shortcutme 2018-07-10 04:00:16 +02:00
parent d677eb1698
commit b1575a979e
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -10,7 +10,7 @@ class Config(object):
def __init__(self, argv): def __init__(self, argv):
self.version = "0.6.3" self.version = "0.6.3"
self.rev = 3523 self.rev = 3524
self.argv = argv self.argv = argv
self.action = None self.action = None
self.pending_changes = {} self.pending_changes = {}
@ -443,7 +443,7 @@ class Config(object):
key_line_i = i key_line_i = i
i += 1 i += 1
if key_line_i: if key_line_i and len(lines) > key_line_i + 1:
while True: # Delete previous multiline values while True: # Delete previous multiline values
is_value_line = lines[key_line_i + 1].startswith(" ") or lines[key_line_i + 1].startswith("\t") is_value_line = lines[key_line_i + 1].startswith(" ") or lines[key_line_i + 1].startswith("\t")
if not is_value_line: if not is_value_line: