Closed desytech closed 3 years ago
In config/config.py we have two decorators: optional and property wrapper. We could merge it into once.
def optional_wrapper(arg): def inner_decorator(f): def wrapped(*args, **kwargs): response = f(*args, **kwargs) return arg if response is None else response return wrapped return inner_decorator def property_wrapper(func): def function_wrapper(x): try: return func(x) except Exception as e: print("Error reading configuration:", e) exit(2) return function_wrapper
Fixed with 4f6faa2
In config/config.py we have two decorators: optional and property wrapper. We could merge it into once.