Changeset: fc0a4a65dc38 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fc0a4a65dc38
Modified Files:
        testing/Mtest.py.in
Branch: Dec2011
Log Message:

Assign value to variable that is used in for loop.
The assignment is needed in case the for loop doesn't run because the
file being looped over is empty.  In that case no assignment takes
place, so we provide a useful value.


diffs (19 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1560,6 +1560,7 @@ def StableOutErr(env,par,TST,SYST,RELEAS
 ### StableOutErr(env,par,TST,SYST,RELEASE,DIST,VERSION) #
 
 def CategorizeResult(TST, SockTime):
+    l = '<!--MajorDiffs-->'   # assign something in case file is empty
     for l in open("%s.out.diff.html" % TST):
         pass
     if   l[:14] == '<!--NoDiffs-->':
@@ -1574,6 +1575,7 @@ def CategorizeResult(TST, SockTime):
         ff.write("\n<!--MajorDiffs-->\n")
         ff.close()
         o = F_ERROR
+    l = '<!--MajorDiffs-->'   # assign something in case file is empty
     for l in open("%s.err.diff.html" % TST):
         pass
     if   l[:14] == '<!--NoDiffs-->':
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to