chore: Fix pylint errors

Fixed a couple pylint errors and disabled remaining false positives.

Change-Id: Ib7e6f42e98f31af1c731c0b69fd26de1572b4471
This commit is contained in:
kgriffs 2014-01-23 11:31:22 -06:00
parent 7a9c45a5b2
commit 9e3eb1336f
4 changed files with 9 additions and 2 deletions

View File

@ -368,7 +368,10 @@ class Catalog(object):
# NOTE(cpp-cabrera): parse general opts: 'drivers'
uri = shard['uri']
# pylint: disable=no-member
storage_type = six.moves.urllib_parse.urlparse(uri).scheme
driver_dict_opts = {'storage': storage_type}
driver_opts = common_utils.dict_to_conf(driver_dict_opts)
@ -437,7 +440,7 @@ class Catalog(object):
shard = select.weighted(self._shards_ctrl.list(limit=0))
if not shard:
raise errors.NoShardsFound()
raise errors.NoShardFound()
self._catalogue_ctrl.insert(project, queue, shard['name'])

View File

@ -52,6 +52,6 @@ class DriverBase(object):
self._conf.register_opts(_TRANSPORT_OPTIONS)
@abc.abstractmethod
def listen():
def listen(self):
"""Start listening for client requests (self-hosting mode)."""
raise NotImplementedError

View File

@ -54,6 +54,7 @@ class FunctionalTestBase(testing.TestBase):
# NOTE(flaper87): Use running instances.
if self.cfg.marconi.run_server:
if not (self.server and self.server.is_alive()):
# pylint: disable=not-callable
self.server = self.server_class()
self.server.start(self.mconf)

View File

@ -49,11 +49,14 @@ class ControllerBaseTest(testing.TestBase):
oslo_cache.register_oslo_configs(self.conf)
cache = oslo_cache.get_cache(self.conf.cache_url)
# pylint: disable=not-callable
self.driver = self.driver_class(self.conf, cache)
self._prepare_conf()
self.addCleanup(self._purge_databases)
# pylint: disable=not-callable
self.controller = self.controller_class(self.driver)
def _prepare_conf(self):