We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a76ad01 commit d173f88Copy full SHA for d173f88
src/cbapi/response/models.py
@@ -2320,15 +2320,17 @@ def crossprocs(self):
2320
2321
@property
2322
def parents(self):
2323
- try:
2324
- parent_proc = self.parent
2325
- while (parent_proc and parent_proc.id and parent_proc.process_md5):
2326
- yield parent_proc
2327
- parent_proc = parent_proc.parent
2328
- except:
+ current_process = self
+ while True:
+ try :
+ parent = current_process.parent
+ if parent.get('pid',-1) == -1:
+ break
2329
+ yield parent
2330
+ current_process = parent
2331
+ except ObjectNotFoundError:
2332
+ return
2333
return
- return
-
2334
2335
def children(self):
2336
"""
0 commit comments