Reformat
This commit is contained in:
parent
d9e3dec0c2
commit
cdf9176258
@ -16,6 +16,7 @@ class CommandEndpoint:
|
||||
:param modules: dict-like object with item access semantics via .get()
|
||||
:param io_handler_factory: function creating a file-like object returning a JSON generator on .read()
|
||||
"""
|
||||
|
||||
def __init__(self, modules, io_handler_factory):
|
||||
self.modules = modules
|
||||
self.io_handler_factory = io_handler_factory
|
||||
@ -57,7 +58,9 @@ class Status:
|
||||
"""Register a new module."""
|
||||
from i3pystatus.text import Text
|
||||
|
||||
if module:
|
||||
if not module:
|
||||
return
|
||||
|
||||
try:
|
||||
return self.modules.append(module, *args, **kwargs)
|
||||
except ImportError as import_error:
|
||||
@ -74,8 +77,6 @@ class Status:
|
||||
return self.modules.append(Text(
|
||||
color="#FF0000",
|
||||
text=configuration_error.message))
|
||||
else:
|
||||
return None
|
||||
|
||||
def run(self):
|
||||
self.command_endpoint.start()
|
||||
|
Loading…
Reference in New Issue
Block a user