Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core/__init__.py: Fix attribute check #862

Open
wants to merge 3 commits into
base: current
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions i3pystatus/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=None):
default_hints={}):
self.standalone = standalone
self.default_hints = default_hints
self.click_events = standalone and click_events
Expand Down Expand Up @@ -113,7 +113,7 @@ def register(self, module, *args, **kwargs):

# Merge the module's hints with the default hints
# and overwrite any duplicates with the hint from the module
hints = self.default_hints.copy() if self.default_hints else {}
hints = self.default_hints.copy() if hasattr(self, "default_hints") else {}
hints.update(kwargs.get('hints', {}))
if hints:
kwargs['hints'] = hints
Expand Down