Reference environment close to use
Reference environment close to use

Variables in environment are only bound after calling
environment.use_stdlib() or environment.use_eventlet(). By binding the
variable at the top of a file like this it is assigned at import time
and so may be left referencing a None value. This means the value is
wrong when it is used later, even though it has since been bound
properly.

There are no additional tests for this as I'm really not sure how to do
it. It would involve testing a complicated series of module loading and
the problem will be negated when we remove eventlet.

Change-Id: Ic56a42c0f1a0fe4e8cc0b5512f00368a3ab8102c
Partial-Bug: #1521122

mahak/keystone,klmitch/keystone,mahak/keystone,cernops/keystone,dims/keystone,mahak/keystone,openstack/keystone,ilay09/keystone,openstack/keystone,openstack/keystone,himanshu-setia/keystone,dims/keystone,rajalokan/keystone,rajalokan/keystone,rajalokan/keystone,klmitch/keystone,ilay09/keystone,ilay09/keystone,himanshu-setia/keystone,cernops/keystone