Permalink
Browse files

Fix _diskcmp to work with geom names

ticket:	#2334
  • Loading branch information...
1 parent ccdff24 commit 8ff946787c16522723ac0af8e9f17d6c02986fb6 @william-gr william-gr committed Jun 23, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 gui/storage/views.py
View
6 gui/storage/views.py
@@ -56,8 +56,10 @@
#FIXME: Move to a utils module
def _diskcmp(a, b):
- rega = re.search(r'^([a-z]+)(\d+)$', a[1])
- regb = re.search(r'^([a-z]+)(\d+)$', b[1])
+ rega = re.search(r'^([a-z/]+)(\d+)$', a[1])
+ regb = re.search(r'^([a-z/]+)(\d+)$', b[1])
+ if not(rega and regb):
+ return 0
return cmp(
(a[0], rega.group(1), int(rega.group(2))),
(b[0], regb.group(1), int(regb.group(2))),

0 comments on commit 8ff9467

Please sign in to comment.