Commit 0cdc712d authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

astakos: Show value even for unknown resource

Do not fail when looking up the unit, if resource is not found.
parent 6a5a579a
......@@ -159,8 +159,9 @@ class ResourceDict(object):
def show_resource_value(number, resource, style):
resource_dict = ResourceDict.get()
unit = resource_dict[resource]['unit']
resources = ResourceDict.get()
resource_dict = resources.get(resource)
unit = resource_dict.get('unit') if resource_dict else None
return, unit, style)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment