diff options
author | Guido Günther <agx@sigxcpu.org> | 2012-02-23 21:14:18 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2012-03-15 16:40:04 +0100 |
commit | 02f12f41b031a1c2672e7cf1cb8ebde58288c547 (patch) | |
tree | 32cb9852bc8d0f15610efc9563d7ca3ff43f7448 | |
parent | 0ddb0a41e0219a06b389050594de96a24a5c0c75 (diff) | |
download | gconf-02f12f41b031a1c2672e7cf1cb8ebde58288c547.tar.gz |
gsettings-schema-convert: Don't fail to convert lists without default element
-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 = '[]' |