mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Revert "make shade python2.6 safe for our inventory update"
This commit is contained in:
parent
472f086862
commit
3115f2ffeb
@ -70,7 +70,7 @@ rackspace-novaclient==1.4 (no files)
|
||||
rax_default_network_flags_python_novaclient_ext==0.2.3 (rax_default_network_flags_python_novaclient_ext/*)
|
||||
rax_scheduled_images_python_novaclient_ext==0.2.1 (rax_scheduled_images_python_novaclient_ext/*)
|
||||
requests==2.5.1 (requests/*)
|
||||
shade==0.5.0 (shade/*, made python2.6 safe by removing dictionary comprehension and adding NullHandler shade/__init__.py)
|
||||
shade==0.5.0 (shade/*)
|
||||
setuptools==12.0.5 (setuptools/*, _markerlib/*, pkg_resources/*, easy_install.py)
|
||||
simplejson==3.6.0 (simplejson/*, excluded simplejson/_speedups.so)
|
||||
six==1.9.0 (six.py)
|
||||
|
@ -14,13 +14,6 @@
|
||||
|
||||
import hashlib
|
||||
import logging
|
||||
import logging
|
||||
import sys
|
||||
if sys.version_info < (2, 7):
|
||||
class NullHandler(logging.Handler):
|
||||
def emit(self, record):
|
||||
pass
|
||||
logging.NullHandler = NullHandler
|
||||
import operator
|
||||
import os
|
||||
import time
|
||||
@ -133,8 +126,8 @@ def _ssl_args(verify, cacert, cert, key):
|
||||
|
||||
|
||||
def _get_service_values(kwargs, service_key):
|
||||
return dict((k[:-(len(service_key) + 1)], kwargs[k])
|
||||
for k in kwargs.keys() if k.endswith(service_key))
|
||||
return {k[:-(len(service_key) + 1)]: kwargs[k]
|
||||
for k in kwargs.keys() if k.endswith(service_key)}
|
||||
|
||||
|
||||
def _iterate_timeout(timeout, message):
|
||||
@ -382,8 +375,8 @@ class OpenStackCloud(object):
|
||||
def project_cache(self):
|
||||
@self._cache.cache_on_arguments()
|
||||
def _project_cache():
|
||||
return ((project.id, project) for project in
|
||||
self._project_manager.list())
|
||||
return {project.id: project for project in
|
||||
self._project_manager.list()}
|
||||
return _project_cache()
|
||||
|
||||
@property
|
||||
@ -451,7 +444,7 @@ class OpenStackCloud(object):
|
||||
@self._cache.cache_on_arguments()
|
||||
def _user_cache():
|
||||
user_list = self.manager.submitTask(_tasks.UserListTask())
|
||||
return dict((user.id, user) for user in user_list)
|
||||
return {user.id: user for user in user_list}
|
||||
return _user_cache()
|
||||
|
||||
def _get_user(self, name_or_id):
|
||||
@ -636,8 +629,8 @@ class OpenStackCloud(object):
|
||||
def flavor_cache(self):
|
||||
@self._cache.cache_on_arguments()
|
||||
def _flavor_cache(cloud):
|
||||
return dict((flavor.id, flavor) for flavor in
|
||||
self.manager.submitTask(_tasks.FlavorList()))
|
||||
return {flavor.id: flavor for flavor in
|
||||
self.manager.submitTask(_tasks.FlavorList())}
|
||||
return _flavor_cache(self.name)
|
||||
|
||||
def get_flavor_name(self, flavor_id):
|
||||
|
Loading…
Reference in New Issue
Block a user