core/init: don't set default_hints with anything (#719)
This commit is contained in:
parent
3233c4cb86
commit
bfcb74a1e0
@ -66,7 +66,7 @@ class Status:
|
|||||||
def __init__(self, standalone=True, click_events=True, interval=1,
|
def __init__(self, standalone=True, click_events=True, interval=1,
|
||||||
input_stream=None, logfile=None, internet_check=None,
|
input_stream=None, logfile=None, internet_check=None,
|
||||||
keep_alive=False, logformat=DEFAULT_LOG_FORMAT,
|
keep_alive=False, logformat=DEFAULT_LOG_FORMAT,
|
||||||
default_hints={"markup": "none"}):
|
default_hints=None):
|
||||||
self.standalone = standalone
|
self.standalone = standalone
|
||||||
self.default_hints = default_hints
|
self.default_hints = default_hints
|
||||||
self.click_events = standalone and click_events
|
self.click_events = standalone and click_events
|
||||||
@ -113,10 +113,10 @@ class Status:
|
|||||||
|
|
||||||
# Merge the module's hints with the default hints
|
# Merge the module's hints with the default hints
|
||||||
# and overwrite any duplicates with the hint from the module
|
# and overwrite any duplicates with the hint from the module
|
||||||
merged_hints = self.default_hints.copy()
|
hints = self.default_hints.copy() if self.default_hints else {}
|
||||||
if 'hints' in kwargs:
|
hints.update(kwargs.get('hints', {}))
|
||||||
merged_hints.update(kwargs['hints'])
|
if hints:
|
||||||
kwargs['hints'] = merged_hints
|
kwargs['hints'] = hints
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return self.modules.append(module, *args, **kwargs)
|
return self.modules.append(module, *args, **kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user