Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrinux committed Oct 2, 2018
1 parent ac81ced commit 1697d46
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions py3status/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,11 @@ def error_output(self, message, method_affected=None):
color = None

error = {
"full_text": message,
"color": color,
"instance": self.module_inst,
"name": self.module_name,
'full_text': message,
'short_text': message,
'color': color,
'instance': self.module_inst,
'name': self.module_name,
}
for method in self.methods.values():
if method_affected and method["method"] != method_affected:
Expand Down Expand Up @@ -279,7 +280,7 @@ def set_updated(self):
output.extend(data)
else:
# if the output is not 'valid' then don't add it.
if data.get("full_text") or "separator" in data:
if data.get('full_text') or data.get('short_text') or 'separator' in data:
if self.testing:
data["cached_until"] = method.get("cached_until")
output.append(data)
Expand Down Expand Up @@ -682,12 +683,16 @@ def deprecation_log(item):
# the method_obj stores infos about each method
# of this module.
method_obj = {
"cached_until": time(),
"call_type": params_type,
"instance": None,
"last_output": {"name": method, "full_text": ""},
"method": method,
"name": None,
'cached_until': time(),
'call_type': params_type,
'instance': None,
'last_output': {
'name': method,
'full_text': '',
'short_text': ''
},
'method': method,
'name': None
}
self.methods[method] = method_obj

Expand Down

0 comments on commit 1697d46

Please sign in to comment.