Skip to content

Commit 74a0fa5

Browse files
committed
Fix buggy regex (make the prefix optional).
1 parent 14e907c commit 74a0fa5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/manhole/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
SIG_NUMBERS.add(num)
2828

2929

30-
def parse_pid(value, regex=re.compile(r'^.+(/manhole-)?(?P<pid>\d+)$')):
30+
def parse_pid(value, regex=re.compile(r'^(.*/manhole-)?(?P<pid>\d+)$')):
3131
match = regex.match(value)
3232
if not match:
3333
raise argparse.ArgumentTypeError("PID must be in one of these forms: 1234 or /tmp/manhole-1234")

0 commit comments

Comments
 (0)