diff options
author | Thomas Bechtold <thomasbechtold@jpberlin.de> | 2012-10-15 09:34:36 +0200 |
---|---|---|
committer | Thomas Bechtold <thomasbechtold@jpberlin.de> | 2012-10-15 09:34:36 +0200 |
commit | 74f93b8cf6df10c5f018f6766c33a6dbecf08383 (patch) | |
tree | a38cbdfb9ad7f199a63cf01c77accd7cb47e7319 | |
parent | bb576e44cd957e3f4d3940b95ccf4dc2b8d3cd2c (diff) | |
download | d-feet-pygi.tar.gz |
Don't reorder propertiespygi
-rw-r--r-- | dfeet/introspection.py | 10 |
1 files 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 |