Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Clearer var names
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Turner committed Nov 29, 2016
1 parent 67e43b9 commit 7b8a897
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions icekit/utils/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ def resolve(obj, attr, fallback=None):
"""
if obj is None:
return fallback
attr = getattr(obj, attr, fallback)
if callable(attr):
return attr()
return attr
value = getattr(obj, attr, fallback)
if callable(value):
return value()
return value

def first_of(obj, *attrs):
"""
Expand Down

0 comments on commit 7b8a897

Please sign in to comment.