Skip to content

Commit 033acbc

Browse files
ryou90berndverst
andauthored
Fix: RecursionError in conf settings class when accessing unimplemented settings (#540)
* Fix: RecursionError in conf settings class Signed-off-by: Robert Unger <[email protected]> * Add attribute error for unsupported settings Signed-off-by: Bernd Verst <[email protected]> --------- Signed-off-by: Robert Unger <[email protected]> Signed-off-by: Bernd Verst <[email protected]> Co-authored-by: Bernd Verst <[email protected]>
1 parent a1aa2cb commit 033acbc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dapr/conf/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ def __init__(self):
2626
setattr(self, setting, env_variable or default_value)
2727

2828
def __getattr__(self, name):
29+
if name not in dir(global_settings):
30+
raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
2931
return getattr(self, name)
3032

3133

0 commit comments

Comments
 (0)