Add support for Python 3.7
Change-Id: I3b880cbf1de13d61d557cde2be70a1efe07761ba
This commit is contained in:
parent
0fce8e48a3
commit
4e4459d57a
@ -153,7 +153,7 @@ class MeterDefinition(object):
|
||||
nb_samples = len(sample['name'])
|
||||
# skip if no meters in payload
|
||||
if nb_samples <= 0:
|
||||
raise StopIteration
|
||||
return
|
||||
|
||||
attributes = self.SAMPLE_ATTRIBUTES + ["message", "metadata"]
|
||||
|
||||
@ -172,7 +172,7 @@ class MeterDefinition(object):
|
||||
'"%(name)s" field instead of %(total)d.' %
|
||||
dict(name=name, nb=nb,
|
||||
total=nb_samples))
|
||||
raise StopIteration
|
||||
return
|
||||
|
||||
# NOTE(sileht): Transform the sample with multiple values per
|
||||
# attribute into multiple samples with one value per attribute.
|
||||
|
@ -85,7 +85,7 @@ class _Base(plugin_base.PollsterBase):
|
||||
def _get_account_info(self, ksclient, tenants):
|
||||
endpoint = self._get_endpoint(self.conf, ksclient)
|
||||
if not endpoint:
|
||||
raise StopIteration()
|
||||
return
|
||||
|
||||
try:
|
||||
from ceilometer.objectstore import rgw_client as c_rgw_client
|
||||
|
@ -83,7 +83,7 @@ class _Base(plugin_base.PollsterBase):
|
||||
def _get_account_info(self, ksclient, tenants):
|
||||
endpoint = self._get_endpoint(self.conf, ksclient)
|
||||
if not endpoint:
|
||||
raise StopIteration()
|
||||
return
|
||||
|
||||
swift_api_method = getattr(swift, '%s_account' % self.METHOD)
|
||||
for t in tenants:
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
import abc
|
||||
|
||||
import funcsigs
|
||||
from oslo_log import log
|
||||
from oslo_utils import netutils
|
||||
import six
|
||||
@ -34,13 +33,7 @@ def get_publisher(conf, url, namespace):
|
||||
"""
|
||||
parse_result = netutils.urlsplit(url)
|
||||
loaded_driver = driver.DriverManager(namespace, parse_result.scheme)
|
||||
if len(funcsigs.signature(loaded_driver.driver).parameters) == 2:
|
||||
return loaded_driver.driver(conf, parse_result)
|
||||
else:
|
||||
# We keep it just the time to cleanup panko
|
||||
LOG.warning("%s publisher use the deprecated class signature",
|
||||
parse_result.scheme)
|
||||
return loaded_driver.driver(parse_result)
|
||||
return loaded_driver.driver(conf, parse_result)
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
|
@ -6,7 +6,6 @@ cachetools>=1.1.0 # MIT License
|
||||
cotyledon>=1.3.0 #Apache-2.0
|
||||
futures>=3.0;python_version=='2.7' or python_version=='2.6' # BSD
|
||||
futurist>=0.11.0 # Apache-2.0
|
||||
funcsigs
|
||||
debtcollector>=1.2.0 # Apache-2.0
|
||||
jsonpath-rw-ext>=0.1.9 # Apache-2.0
|
||||
lxml>=2.3 # BSD
|
||||
|
Loading…
x
Reference in New Issue
Block a user