chmouel/upcs — pull request #12 by rconradharris (2013-05-30 00:26:46+00:00)
Title: Fix AUTH_VERSION not being set

The patch to update the code to handle swift+keystone introduced a bug where
using UK or US as a location would result in `AUTH_VERSION` not being set.
Because of this, later code would inadvertantly treat the auth response as
being version 2, which caused th JSON parsing to break with a KeyError on
'access'.

This patch refactors the code slightly to make it slightly clearer that all
branches of the if statement set AUTH_VERSION, and then defaults the RAX
branches to version 1.