Fix PEP257 issues
This commit is contained in:
parent
4f536ac63d
commit
897b5c668f
8 changed files with 145 additions and 141 deletions
|
@ -1,23 +1,28 @@
|
|||
""" Exceptions used by Home Assistant """
|
||||
"""Exceptions used by Home Assistant."""
|
||||
|
||||
|
||||
class HomeAssistantError(Exception):
|
||||
""" General Home Assistant exception occured. """
|
||||
"""General Home Assistant exception occurred."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class InvalidEntityFormatError(HomeAssistantError):
|
||||
""" When an invalid formatted entity is encountered. """
|
||||
"""When an invalid formatted entity is encountered."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class NoEntitySpecifiedError(HomeAssistantError):
|
||||
""" When no entity is specified. """
|
||||
"""When no entity is specified."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class TemplateError(HomeAssistantError):
|
||||
""" Error during template rendering. """
|
||||
"""Error during template rendering."""
|
||||
|
||||
def __init__(self, exception):
|
||||
"""Initalize the error."""
|
||||
super().__init__('{}: {}'.format(exception.__class__.__name__,
|
||||
exception))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue