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 ee7bb21 commit 7c7e372Copy full SHA for 7c7e372
src/cbapi/response/models.py
@@ -2320,16 +2320,17 @@ def crossprocs(self):
2320
2321
@property
2322
def parents(self):
2323
- parent = self.parent
2324
- try:
2325
- while (parent and parent.process_md5 and parent.id):
2326
- try :
+ current_process = self
+ while True:
+ try :
+ parent = current_process.parent
2327
+ if parent.get('pid',-1) == -1:
2328
+ break
2329
yield parent
- parent = parent.parent
2330
+ current_process = parent
2331
except ObjectNotFoundError:
2332
return
- except ObjectNotFoundError:
- return
2333
+ return
2334
2335
def children(self):
2336
"""
0 commit comments