- Timestamp:
- May 11, 2020, 9:00:05 PM (7 years ago)
- Branches:
- debian/bullseye, master
- Children:
- cd3ea37
- Parents:
- 812f687
- File:
-
- 1 edited
-
src/gnuboat/common/webservice/Config.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/gnuboat/common/webservice/Config.py
r812f687 r30949f8 26 26 27 27 return config 28 29 30 def config_get(config_object, option, default_value): 31 """ 32 Returns the value of option in config_object object. 33 If config_object has no attribute option, it returns 34 default_value 35 """ 36 if hasattr(config_object, option): 37 return getattr(config_object, option) 38 if isinstance(config_object, dict) and option in config_object: 39 return config_object[option] 40 return default_value
Note:
See TracChangeset
for help on using the changeset viewer.
