[glib/new-gsettings] Detect more broken indentation cases in schema converter



commit 6fd153d478ddb72b8e3045243bfadba55a75d4c5
Author: Vincent Untz <vuntz gnome org>
Date:   Sat Apr 17 01:27:29 2010 -0400

    Detect more broken indentation cases in schema converter

 gio/gsettings-schema-convert |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gio/gsettings-schema-convert b/gio/gsettings-schema-convert
index 702a9c4..815efce 100755
--- a/gio/gsettings-schema-convert
+++ b/gio/gsettings-schema-convert
@@ -455,7 +455,9 @@ def _eat_indent(line, indent_stack):
         else:
             continue
 
-    if buf and previous_max_index <= index:
+    if buf and previous_max_index > index:
+        raise GSettingsSchemaConvertException('Inconsistent indentation.')
+    elif buf and previous_max_index <= index:
         indent_stack.append(buf)
     elif previous_max_index > index:
         indent_stack = indent_stack[:index + 1]



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