[GRASS-SVN] r73231 - grass/branches/releasebranch_7_6/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Sep 3 07:44:03 PDT 2018
Author: annakrat
Date: 2018-09-03 07:44:03 -0700 (Mon, 03 Sep 2018)
New Revision: 73231
Modified:
grass/branches/releasebranch_7_6/gui/wxpython/gui_core/dialogs.py
Log:
wxGUI: wx4 doesn't have Image.GetHandlers, fixes #3617
Modified: grass/branches/releasebranch_7_6/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/branches/releasebranch_7_6/gui/wxpython/gui_core/dialogs.py 2018-09-03 02:31:55 UTC (rev 73230)
+++ grass/branches/releasebranch_7_6/gui/wxpython/gui_core/dialogs.py 2018-09-03 14:44:03 UTC (rev 73231)
@@ -1831,8 +1831,11 @@
"""Get list of supported image handlers"""
lext = list()
ltype = list()
- for h in image.GetHandlers():
- lext.append(h.GetExtension())
+ try:
+ for h in image.GetHandlers():
+ lext.append(h.GetExtension())
+ except AttributeError:
+ lext = {'png', 'gif', 'jpg', 'pcx', 'pnm', 'tif', 'xpm'}
filetype = ''
if 'png' in lext:
More information about the grass-commit
mailing list