summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Untz <vuntz@gnome.org>2010-07-02 19:08:14 +0200
committerVincent Untz <vuntz@gnome.org>2010-07-02 19:08:14 +0200
commit10e7f322f827aa92a6071d77972d835a65d0bed1 (patch)
tree86e127240b0bc0398a6e33c837551ef60f8862e9
parenta2a4ed4d8b9517e7d67aaf541345f2c12cfcee6d (diff)
downloadgconf-10e7f322f827aa92a6071d77972d835a65d0bed1.tar.gz
[gsettings] Fix gsettings-schema-convert crash when lxml is unavailable
https://bugzilla.gnome.org/show_bug.cgi?id=616647
-rwxr-xr-xgsettings/gsettings-schema-convert5
1 files changed, 2 insertions, 3 deletions
diff --git a/gsettings/gsettings-schema-convert b/gsettings/gsettings-schema-convert
index b6b27f0c..db26c85b 100755
--- a/gsettings/gsettings-schema-convert
+++ b/gsettings/gsettings-schema-convert
@@ -1039,12 +1039,11 @@ def main(args):
if options.xml:
node = schema_root.get_xml_node()
- tree = ET.ElementTree(node)
try:
- output = ET.tostring(tree, pretty_print = True)
+ output = ET.tostring(node, pretty_print = True)
except TypeError:
# pretty_print only works with lxml
- output = ET.tostring(tree)
+ output = ET.tostring(node)
else:
output = schema_root.get_simple_string()