File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1- __version__ = "1.1.1 "
1+ __version__ = "1.1.2 "
Original file line number Diff line number Diff line change @@ -207,7 +207,10 @@ def pgrep_maps(match: str) -> List[Process]:
207207 for line in result .stdout .splitlines ():
208208 assert line .startswith (b"/proc/" ) and line .endswith (b"/maps" ), f"unexpected 'grep' line: { line !r} "
209209 pid = int (line [len (b"/proc/" ) : - len (b"/maps" )])
210- processes .append (Process (pid ))
210+ try :
211+ processes .append (Process (pid ))
212+ except psutil .NoSuchProcess :
213+ continue # process might have died meanwhile
211214
212215 return processes
213216
@@ -500,5 +503,5 @@ def get_hostname() -> str:
500503 return hostname
501504
502505
503- def random_prefix ():
504- '' .join (random .choice (string .ascii_letters ) for _ in range (16 ))
506+ def random_prefix () -> str :
507+ return '' .join (random .choice (string .ascii_letters ) for _ in range (16 ))
You can’t perform that action at this time.
0 commit comments