Skip to content
Snippets Groups Projects
Commit 9142061d authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Catch non-existing files in logtool.

parent 055a5e2d
No related branches found
No related tags found
No related merge requests found
...@@ -129,7 +129,11 @@ following: ...@@ -129,7 +129,11 @@ following:
print logmgr.quantity_data[args.pop(0)].table print logmgr.quantity_data[args.pop(0)].table
else: else:
# not a known command, interpret as file name # not a known command, interpret as file name
logmgr = LogManager(cmd) from os import access, R_OK
if access(cmd, R_OK):
logmgr = LogManager(cmd)
else:
raise IOError, "file '%s' not found" % cmd
if did_plot: if did_plot:
from pylab import show, title, legend, axis, grid from pylab import show, title, legend, axis, grid
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment