Skip to content

Commit

Permalink
Fix PEP8
Browse files Browse the repository at this point in the history
  • Loading branch information
alfred82santa committed Oct 10, 2016
1 parent 0a66a56 commit 04603b8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions service_client/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ def load_spec_by_sepc_loader(spec_loader, loader):


class ServiceClientFactory(BaseFactory):

def __call__(self, spec=None, spec_loader=None, plugins=None,
parser=None, serializer=None, logger=None, **kwargs):
if spec_loader:
spec = load_spec_by_sepc_loader(spec_loader, self.loader)

try:
plugins = self.iter_loaded_item_list(plugins, BasePlugin)
except TypeError: # pragma: no cover
except TypeError: # pragma: no cover
pass

if isinstance(parser, str):
Expand All @@ -31,18 +32,19 @@ def __call__(self, spec=None, spec_loader=None, plugins=None,

try:
logger = self.load_item(logger, Logger)
except TypeError: # pragma: no cover
except TypeError: # pragma: no cover
pass

return super(ServiceClientFactory, self).__call__(spec=spec, plugins=plugins, parser=parser,
serializer=serializer, logger=logger, **kwargs)


class LoggerPluginFactory(BaseFactory):

def __call__(self, logger, **kwargs):
try:
logger = self.load_item(logger, Logger)
except TypeError: # pragma: no cover
except TypeError: # pragma: no cover
pass

return super(LoggerPluginFactory, self).__call__(logger=logger, **kwargs)
Expand Down

0 comments on commit 04603b8

Please sign in to comment.