瀏覽代碼

wxGUI/g.gui.psmap: fix add legend error message (#1041)

Tomas Zigo 4 年之前
父節點
當前提交
6549c8c739
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      gui/wxpython/psmap/utils.py

+ 1 - 1
gui/wxpython/psmap/utils.py

@@ -402,7 +402,7 @@ def getRasterType(map):
     if map is None:
         map = ''
     file = grass.find_file(name=map, element='cell')
-    if file['file']:
+    if file.get('file'):
         rasterType = grass.raster_info(map)['datatype']
         return rasterType
     else: