Skip to content

Commit 3e325e8

Browse files
committed
Remove unnecessary argument check
These args are already mutually exclusive, but we need to check if at least on module argument has been passed.
1 parent 6ad8ad7 commit 3e325e8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Lib/profile/sample.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -760,10 +760,8 @@ def main():
760760

761761
sort_value = args.sort if args.sort is not None else 2
762762

763-
if not(args.pid or args.module or args.script):
764-
parser.error(
765-
"You must specify either a process ID (-p), a module (-m), or a script to run."
766-
)
763+
if args.module is not None and not args.module:
764+
parser.error("the following arguments are required: module name")
767765

768766
if args.pid:
769767
sample(

0 commit comments

Comments
 (0)