core/init: don't set default_hints with anything (#719)

This commit is contained in:
lasers 2019-03-24 01:38:48 -05:00 committed by chestm007
parent 3233c4cb86
commit bfcb74a1e0

View File

@ -66,7 +66,7 @@ class Status:
def __init__(self, standalone=True, click_events=True, interval=1,
input_stream=None, logfile=None, internet_check=None,
keep_alive=False, logformat=DEFAULT_LOG_FORMAT,
default_hints={"markup": "none"}):
default_hints=None):
self.standalone = standalone
self.default_hints = default_hints
self.click_events = standalone and click_events
@ -113,10 +113,10 @@ class Status:
# Merge the module's hints with the default hints
# and overwrite any duplicates with the hint from the module
merged_hints = self.default_hints.copy()
if 'hints' in kwargs:
merged_hints.update(kwargs['hints'])
kwargs['hints'] = merged_hints
hints = self.default_hints.copy() if self.default_hints else {}
hints.update(kwargs.get('hints', {}))
if hints:
kwargs['hints'] = hints
try:
return self.modules.append(module, *args, **kwargs)