[Greater-commits] r3754 - branches/3.0.0-usf/GREAT-ER/Greater/Modules

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Jul 29 16:30:10 CEST 2011


Author: aheinecke
Date: 2011-07-29 16:30:10 +0200 (Fri, 29 Jul 2011)
New Revision: 3754

Modified:
   branches/3.0.0-usf/GREAT-ER/Greater/Modules/parameter.py
Log:
Instead of creating a traceback by accessing a none type print
the message that a parameter could not be found


Modified: branches/3.0.0-usf/GREAT-ER/Greater/Modules/parameter.py
===================================================================
--- branches/3.0.0-usf/GREAT-ER/Greater/Modules/parameter.py	2011-07-29 14:29:16 UTC (rev 3753)
+++ branches/3.0.0-usf/GREAT-ER/Greater/Modules/parameter.py	2011-07-29 14:30:10 UTC (rev 3754)
@@ -176,10 +176,9 @@
     # called with a specific group id.
     assert group_id == "%"
     description = [paratree.paratree.get_field(block_id, field_id)]
-
     parameter = None
 
-    if len(description) > 0:
+    if len(description) > 0 and description[0] != None:
         description = description[0]
         description.remark = description.remark.replace("\\n","\n")
     else:



More information about the Greater-commits mailing list