Commit c9a379e
committed
python: uri: fix intermittent failure of fallback pid resolver
Problem: The fallback PID URI resolver was failing intermittently
during testing due to what was presumed whitespace in the command
string found in /proc/[pid]/stat. Since the /proc/[pid]/stat contents
were split into fields on whitespace, the incorrect field was passed
to int() and an exception thrown, resulting in the inscrutable error:
flux-uri: ERROR: invalid literal for int() with base 10: 'S'
To fix, use a regex instead of simply splitting the contents on
whitespace. This allows whitespace to possibly occur in the command
name, since we now consume everything between parentheses as the
command name.
Fixes #41681 parent 78d2cb0 commit c9a379e
1 file changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
| |||
0 commit comments