Skip to content

Commit 16ffef7

Browse files
committed
Check arguments before logging in run_action.
1 parent 29c5f4b commit 16ffef7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

mprof

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,14 @@ def run_action():
199199
help="""Monitors forked processes as well (sum up all process memory)""")
200200

201201
(options, args) = parser.parse_args()
202-
print("{1}: Sampling memory every {0.interval}s".format(
203-
options, osp.basename(sys.argv[0])))
204202

205203
if len(args) == 0:
206204
print("A program to run must be provided. Use -h for help")
207205
sys.exit(1)
208206

207+
print("{1}: Sampling memory every {0.interval}s".format(
208+
options, osp.basename(sys.argv[0])))
209+
209210
## Output results in a file called "mprofile_<YYYYMMDDhhmmss>.dat" (where
210211
## <YYYYMMDDhhmmss> is the date-time of the program start) in the current
211212
## directory. This file contains the process memory consumption, in Mb (one

0 commit comments

Comments
 (0)