Merge pull request #442 from nickhs/441

Error to stdout when loading bad replays from the command line
This commit is contained in:
Maximilian Hils 2015-01-09 00:39:36 +01:00
commit dcc248797f
1 changed files with 10 additions and 2 deletions

View File

@ -508,14 +508,22 @@ class ConsoleMaster(flow.FlowMaster):
def client_playback_path(self, path):
err, ret = self._readflow(path)
if err:
self.statusbar.message(ret)
if not self.statusbar:
print >> sys.stderr, ret
sys.exit(1)
else:
self.statusbar.message(ret)
else:
self.start_client_playback(ret, False)
def server_playback_path(self, path):
err, ret = self._readflow(path)
if err:
self.statusbar.message(ret)
if not self.statusbar:
print >> sys.stderr, ret
sys.exit(1)
else:
self.statusbar.message(ret)
else:
self.start_server_playback(
ret,