[2019/10/24 15:14:30.473] ERROR: test_download (test.test_gridfs_spec.TestAllScenarios) [2019/10/24 15:14:30.473] ---------------------------------------------------------------------- [2019/10/24 15:14:30.473] Traceback (most recent call last): [2019/10/24 15:14:30.473] File "/data/mci/6ba00614a2279a83cbe73498853dcce9/src/.tox/synchro37/tmp/mongo-python-driver/test/test_gridfs_spec.py", line 158, in run_scenario [2019/10/24 15:14:30.473] self.init_expected_db(test, result) [2019/10/24 15:14:30.473] UnboundLocalError: local variable 'result' referenced before assignment
The problem is that "result" is potentially undefined in this block:
error = None try: result = operation(**converted_args) if 'download' in test['act']['operation']: result = Binary(result.read()) except Exception as exc: error = exc self.init_expected_db(test, result)
Noticed while working on MOTOR-228.
- related to
-
MOTOR-440 Add session parameter to GridOut class
- Closed