"wrappers/vscode:/vscode.git/clone" did not exist on "78d42678b2c1b1af59786eb2b707a444feb4a081"
Commit 17d440fe authored by Jason Swails's avatar Jason Swails
Browse files

Add the flush calls back to statedatareporter properly protected by try-except.

parent 7b28f2c5
......@@ -117,6 +117,10 @@ class StateDataReporter(object):
self._initializeConstants(simulation)
headers = self._constructHeaders()
print >>self._out, '#"%s"' % ('"'+self._separator+'"').join(headers)
try:
self._out.flush()
except AttributeError:
pass
self._hasInitialized = True
# Check for errors.
......@@ -127,6 +131,10 @@ class StateDataReporter(object):
# Write the values.
print >>self._out, self._separator.join(str(v) for v in values)
try:
self._out.flush()
except AttributeError:
pass
def _constructReportValues(self, simulation, state):
"""Query the simulation for the current state of our observables of interest.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment