softlayer / jumpgate

A simple library to make more clouds compatible with OpenStack.
http://softlayer.github.io/jumpgate/
MIT License
46 stars 30 forks source link

Fixed unbounded local error issue #126

Closed ghost closed 10 years ago

ghost commented 10 years ago

Proxy was never initialized in the else case.

After getting the latest clone, the following error occurs when issuing any API.

File "/home/andrew/error/jumpgate/jumpgate/identity/drivers/sl/tokens.py", line 170, in on_post auth = identity.auth_driver().authenticate(credentials) File "/home/andrew/error/jumpgate/jumpgate/identity/drivers/sl/tokens.py", line 116, in authenticate proxy=proxy) UnboundLocalError: local variable 'proxy' referenced before assignment POST /v2.0/tokens 500 Internal Server Error [ReqId: req-070186de-0615-11e4-bf28-080027ba3401

sudorandom commented 10 years ago

@AndrewFly I restarted the pypy tests in travis. Hopefully it won't error out while trying to download the requirements this time.

Thanks for the PR.