浏览代码

wxGUI/datacatalog: avoid ValueError when map name corrupted with multiple @ chars (#966)

fixes #959
Anna Petrasova 4 年之前
父节点
当前提交
9ed1a86fe2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      gui/wxpython/datacatalog/tree.py

+ 1 - 1
gui/wxpython/datacatalog/tree.py

@@ -166,7 +166,7 @@ def getLocationTree(gisdbase, location, queue, mapsets=None):
                 location, len(listOfMaps)))
         for each in listOfMaps:
             ltype, wholename = each.split('/')
-            name, mapset = wholename.split('@')
+            name, mapset = wholename.split('@', maxsplit=1)
             maps_dict[mapset].append({'name': name, 'type': ltype})
 
     queue.put((maps_dict, None))