Skip to content

Commit

Permalink
Quit if no file found at all and tell when using last profile data
Browse files Browse the repository at this point in the history
  • Loading branch information
shyba committed Jun 6, 2015
1 parent 9ff038f commit 05e9714
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mprof
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ def plot_action():
"mprofile_*.dat files, generated by the "
"'mprof run' command.")
sys.exit(-1)
print("Using last profile data.")
filenames = [profiles[-1]]
else:
filenames = []
Expand All @@ -445,6 +446,9 @@ def plot_action():
filenames.append(profiles[n])
except ValueError:
print("Input file not found: " + arg)
if not len(filenames):
print("No files found from given input.")
sys.exit(-1)

pl.figure(figsize=(14, 6), dpi=90)
if len(filenames) > 1 or options.no_timestamps:
Expand Down

0 comments on commit 05e9714

Please sign in to comment.