Skip to content

Commit 7c7e372

Browse files
committed
Update
1 parent ee7bb21 commit 7c7e372

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/cbapi/response/models.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,16 +2320,17 @@ def crossprocs(self):
23202320

23212321
@property
23222322
def parents(self):
2323-
parent = self.parent
2324-
try:
2325-
while (parent and parent.process_md5 and parent.id):
2326-
try :
2323+
current_process = self
2324+
while True:
2325+
try :
2326+
parent = current_process.parent
2327+
if parent.get('pid',-1) == -1:
2328+
break
23272329
yield parent
2328-
parent = parent.parent
2330+
current_process = parent
23292331
except ObjectNotFoundError:
23302332
return
2331-
except ObjectNotFoundError:
2332-
return
2333+
return
23332334
@property
23342335
def children(self):
23352336
"""

0 commit comments

Comments
 (0)