[Greater-commits] r446 - trunk/GREAT-ER/Greater/Modules
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jul 14 11:34:17 CEST 2011
Author: aheinecke
Date: 2011-07-14 11:34:17 +0200 (Thu, 14 Jul 2011)
New Revision: 446
Modified:
trunk/GREAT-ER/Greater/Modules/model.py
Log:
dlg.Update returns a tuple in this python version where the first value
is set to False if the dialog is canceled
Modified: trunk/GREAT-ER/Greater/Modules/model.py
===================================================================
--- trunk/GREAT-ER/Greater/Modules/model.py 2011-07-14 09:22:06 UTC (rev 445)
+++ trunk/GREAT-ER/Greater/Modules/model.py 2011-07-14 09:34:17 UTC (rev 446)
@@ -613,7 +613,7 @@
raise RuntimeError('GreaterModelError:8512:%s' % sys.exc_info()[1])
proceed=0
if status[0] == 'initializing':
- if not dlg.Update(int(status[1]), 'Initializing ...'):
+ if not dlg.Update(int(status[1]), 'Initializing ...')[0]:
try:
simserverconn.rpc.simulation.stop(simid)
except:
@@ -626,7 +626,7 @@
prev_status = ('waiting',
'Waiting (for free computing resources) ...')
if not dlg.Update(0, 'Waiting (for free computing ' \
- 'resources) ...'):
+ 'resources) ...')[0]:
try:
simserverconn.rpc.simulation.stop(simid)
except:
@@ -638,7 +638,7 @@
dlg.Update(100, prev_status[1]) # show 100% done
prev_status = ('running',
'Running ...')
- if not dlg.Update(int(status[1]), 'Running ...'):
+ if not dlg.Update(int(status[1]), 'Running ...')[0]:
try:
simserverconn.rpc.simulation.stop(simid)
except:
@@ -651,7 +651,7 @@
prev_status = ('writing_results',
'Writing results to database ...')
if not dlg.Update(int(status[1]),
- 'Writing results to database ...'):
+ 'Writing results to database ...')[0]:
try:
simserverconn.rpc.simulation.stop(simid)
except:
@@ -664,7 +664,7 @@
prev_status = ('stopping',
'Stopping simulation ...')
if not dlg.Update(int(status[1]),
- 'Stopping simulation ...'):
+ 'Stopping simulation ...')[0]:
try:
simserverconn.rpc.simulation.stop(simid)
except:
More information about the Greater-commits
mailing list