Skip to content

Commit

Permalink
Simplify get_pref_or_default
Browse files Browse the repository at this point in the history
  • Loading branch information
MoritzBrueckner committed Oct 31, 2020
1 parent 0f3233d commit 25ed205
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blender/arm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def get_relative_paths():
def get_pref_or_default(prop_name: str, default: Any) -> Any:
"""Return the preference setting for prop_name, or the value given as default if the property does not exist."""
addon_prefs = get_arm_preferences()
return default if not hasattr(addon_prefs, prop_name) else getattr(addon_prefs, prop_name)
return getattr(addon_prefs, prop_name, default)

def get_node_path():
if get_os() == 'win':
Expand Down

0 comments on commit 25ed205

Please sign in to comment.