Skip to content

Commit

Permalink
Fix a few flake8 issues from previous changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetazzoni committed Apr 17, 2019
1 parent 858bcd4 commit c286ca3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion maestro/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def get_image_ids(self):
images = {}
for image in self._backend.images():
tags = image.get('RepoTags', [])
if not tags or tags is '<none>:<none>':
if not tags or tags == '<none>:<none>':
continue
for tag in image['RepoTags']:
images[tag] = image['Id']
Expand Down
14 changes: 8 additions & 6 deletions maestro/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,29 +57,31 @@ def __str__(self):
return '{}: {}'.format(self.container.name, self.message)


class InvalidPortSpecException(MaestroException):
class InvalidPortSpecException(EnvironmentConfigurationException):
"""Error thrown when a port spec is in an invalid format."""
pass


class InvalidLifecycleCheckConfigurationException(MaestroException):
class InvalidLifecycleCheckConfigurationException(
EnvironmentConfigurationException):
"""Error thrown when a lifecycle check isn't configured properly."""
pass


class InvalidRestartPolicyConfigurationException(MaestroException):
class InvalidRestartPolicyConfigurationException(
EnvironmentConfigurationException):
"""Error thrown when a restart policy isn't configured properly."""
pass


class InvalidVolumeConfigurationException(MaestroException):
class InvalidVolumeConfigurationException(EnvironmentConfigurationException):
"""Error thrown when a volume binding isn't configured properly."""


class InvalidAuditorConfigurationException(MaestroException):
class InvalidAuditorConfigurationException(EnvironmentConfigurationException):
"""Invalid configuration of one of the specified auditors."""


class InvalidLogConfigurationException(MaestroException):
class InvalidLogConfigurationException(EnvironmentConfigurationException):
"""Error thrown when a log_driver or log_opt is in an invalid format."""
pass

0 comments on commit c286ca3

Please sign in to comment.