diff --git a/src/manhole/cli.py b/src/manhole/cli.py index 0a590f0..53ac30e 100755 --- a/src/manhole/cli.py +++ b/src/manhole/cli.py @@ -27,7 +27,7 @@ SIG_NUMBERS.add(num) -def parse_pid(value, regex=re.compile(r'^.+(/manhole-)?(?P\d+)$')): +def parse_pid(value, regex=re.compile(r'^(.*/manhole-)?(?P\d+)$')): match = regex.match(value) if not match: raise argparse.ArgumentTypeError("PID must be in one of these forms: 1234 or /tmp/manhole-1234")