Skip to content

Commit

Permalink
Fix tracemalloc error when action isn't defined (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
basepi authored Jun 11, 2023
1 parent 8dc692f commit f4db461
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
=========

Version 2.6.1
-------------

* Fix a possible attribute error in argument parsing.
Patch by Colton Myers

Version 2.6.0 (2023-03-22)
--------------------------

Expand Down
2 changes: 1 addition & 1 deletion pyperf/_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def _process_args_impl(self):
self._only_in_worker("--worker-task")

if args.tracemalloc:
if args.action == 'command':
if getattr(args, 'action', None) == 'command':
raise CLIError('--tracemalloc cannot be used with pyperf command')
try:
import tracemalloc # noqa
Expand Down

0 comments on commit f4db461

Please sign in to comment.