Skip to content

Commit fe03db9

Browse files
authored
Merge pull request #147 from dataiku/fix/dss80-python-api-future-repair-ch63638
Repairing `DSSFuture.wait_for_result()`
2 parents b6ed6c5 + ca04207 commit fe03db9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dataikuapi/dss/future.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ def wait_for_result(self):
7272
"""
7373
Wait and get the future result
7474
"""
75-
if self.state.get('hasResult', False):
75+
if self.state is not None and self.state.get('hasResult', False):
76+
# no future created in backend, result already in the state
7677
return self.result_wrapper(self.state.get('result', None))
7778
if self.state is None or not self.state.get('hasResult', False) or self.state_is_peek:
7879
self.get_state()

0 commit comments

Comments
 (0)