[gconf] [gsettings] Fix gsettings-schema-convert crash when lxml is unavailable



commit 10e7f322f827aa92a6071d77972d835a65d0bed1
Author: Vincent Untz <vuntz gnome org>
Date:   Fri Jul 2 19:08:14 2010 +0200

    [gsettings] Fix gsettings-schema-convert crash when lxml is unavailable
    
    https://bugzilla.gnome.org/show_bug.cgi?id=616647

 gsettings/gsettings-schema-convert |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gsettings/gsettings-schema-convert b/gsettings/gsettings-schema-convert
index b6b27f0..db26c85 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()
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]