From 74f93b8cf6df10c5f018f6766c33a6dbecf08383 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Mon, 15 Oct 2012 09:34:36 +0200 Subject: Don't reorder properties --- dfeet/introspection.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dfeet/introspection.py b/dfeet/introspection.py index 1e3faa4..a30818b 100644 --- a/dfeet/introspection.py +++ b/dfeet/introspection.py @@ -123,8 +123,14 @@ class AddressInfo(): un1 = model.get_value(iter1, 0) un2 = model.get_value(iter2, 0) - un1_depth = len(un1.split("/")) - un2_depth = len(un2.split("/")) + if un1.startswith("/"): + un1_depth = len(un1.split("/")) + else: + un1_depth = 1 + if un2.startswith("/"): + un2_depth = len(un2.split("/")) + else: + un2_depth = 1 if un1_depth > un2_depth: return 1 -- cgit v1.2.1