Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fail with ConfigError without UnboundLocalError
When volumes configuration has an error in it, loop does not break correctly. A ConfigError is returned but the succeeding code actual fails with an UnboundLocalError as well since volume and bind were never initialised. Failure before this change : Restarting buildmaster "FRB Buildmaster" self.volumes.append(volume) exceptions.UnboundLocalError: local variable 'volume' referenced before assignment 2016-03-15 21:27:27+0000 [-] Configuration Errors: 2016-03-15 21:27:27+0000 [-] Invalid volume definition for docker /tmp/t/tmp/t. Skipping... 2016-03-15 21:27:27+0000 [-] error while parsing config file: local variable 'volume' referenced before assignment (traceback in logfile) 2016-03-15 21:27:27+0000 [-] Halting master. Failure after this change : Restarting buildmaster "FRB Buildmaster" 2016-03-15 21:27:19+0000 [-] 2016-03-15 21:27:19+0000 [-] Configuration Errors: 2016-03-15 21:27:19+0000 [-] Invalid volume definition for docker /tmp/t/tmp/t. Skipping... 2016-03-15 21:27:19+0000 [-] Halting master.
- Loading branch information