[glib/new-gsettings] Fix simple format parser to accept l10n contexts with a space
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/new-gsettings] Fix simple format parser to accept l10n contexts with a space
- Date: Sat, 17 Apr 2010 22:00:17 +0000 (UTC)
commit d020617c2ad2a224bb4e48f9580bf39dc9555973
Author: Vincent Untz <vuntz gnome org>
Date: Sat Apr 17 17:59:30 2010 -0400
Fix simple format parser to accept l10n contexts with a space
gio/gsettings-schema-convert | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/gsettings-schema-convert b/gio/gsettings-schema-convert
index 3c9e96f..7c9bfdc 100755
--- a/gio/gsettings-schema-convert
+++ b/gio/gsettings-schema-convert
@@ -483,7 +483,7 @@ class SimpleSchemaParser:
def _parse_l10n(self):
line = self.unparsed_line
- items = [ item.strip() for item in line.split(' ') if item.strip() ]
+ items = [ item.strip() for item in line.split(' ', 1) if item.strip() ]
if not items:
self.unparsed_line = ''
return (None, None)
@@ -494,7 +494,7 @@ class SimpleSchemaParser:
self.unparsed_line = ''
return (items[0], items[1])
- raise GSettingsSchemaConvertException('Localization \'%s\' cannot be parsed.' % line)
+ raise GSettingsSchemaConvertException('Internal error: more items than expected for localization \'%s\'.' % line)
def _parse_choices(self, object):
if object.type not in TYPES_FOR_CHOICES:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]