Skip to content

Commit 05e9714

Browse files
committed
Quit if no file found at all and tell when using last profile data
1 parent 9ff038f commit 05e9714

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

mprof

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ def plot_action():
431431
"mprofile_*.dat files, generated by the "
432432
"'mprof run' command.")
433433
sys.exit(-1)
434+
print("Using last profile data.")
434435
filenames = [profiles[-1]]
435436
else:
436437
filenames = []
@@ -445,6 +446,9 @@ def plot_action():
445446
filenames.append(profiles[n])
446447
except ValueError:
447448
print("Input file not found: " + arg)
449+
if not len(filenames):
450+
print("No files found from given input.")
451+
sys.exit(-1)
448452

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

0 commit comments

Comments
 (0)