Skip to content

Commit 3287716

Browse files
committed
Attempt to make parents generator more robust by taking code from .walk_parents function
1 parent 8030d58 commit 3287716

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cbapi/response/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2322,7 +2322,7 @@ def crossprocs(self):
23222322
def parents(self):
23232323
try:
23242324
parent_proc = self.parent
2325-
while (parent_proc and parent_proc.id):
2325+
while parent_proc and parent_proc.id and parent_proc.get("process_pid", -1) != -1:
23262326
yield parent_proc
23272327
parent_proc = parent_proc.parent
23282328
except:

0 commit comments

Comments
 (0)