Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion memory_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def posix_tool():
return mem, time.time()
else:
return mem
except:
except (ValueError, IndexError):
if timestamps:
return -1, time.time()
else:
Expand Down
4 changes: 2 additions & 2 deletions mprof.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def run_action():
p = proc.pid
try:
cmd_line = proc.cmdline()
except:
except Exception:
cmd_line = get_cmd_line(program)
if args.timeout is None:
args.timeout = 3600
Expand Down Expand Up @@ -756,7 +756,7 @@ def plot_action():
def xlim_type(value):
try:
newvalue = [float(x) for x in value.split(',')]
except:
except (ValueError, AttributeError):
raise ArgumentError("'%s' option must contain two numbers separated with a comma" % value)
if len(newvalue) != 2:
raise ArgumentError("'%s' option must contain two numbers separated with a comma" % value)
Expand Down