diff options
-rwxr-xr-x | gsettings/gsettings-schema-convert | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gsettings/gsettings-schema-convert b/gsettings/gsettings-schema-convert index a60dc35f..913cc83b 100755 --- a/gsettings/gsettings-schema-convert +++ b/gsettings/gsettings-schema-convert @@ -854,11 +854,10 @@ class GConfSchema: # Fix the default value to be parsable by GVariant if self.type == 'list': l = self.default.strip() - if not (l[0] == '[' and l[-1] == ']'): - if not l: - l = '[]' - else: - raise GSettingsSchemaConvertException('Cannot parse default list value \'%s\' for key \'%s\'.' % (self.default, self.applyto or self.key)) + if not l: + l = '[]' + elif not (l[0] == '[' and l[-1] == ']'): + raise GSettingsSchemaConvertException('Cannot parse default list value \'%s\' for key \'%s\'.' % (self.default, self.applyto or self.key)) values = l[1:-1].strip() if not values: self.default = '[]' |