diff options
author | Erik Olof Gunnar Andersson <eandersson@blizzard.com> | 2021-12-17 18:32:03 -0800 |
---|---|---|
committer | Vishal Manchanda <manchandavishal143@gmail.com> | 2022-01-27 06:39:45 +0000 |
commit | 27887e356f4c7a62d20d75b15dc08ac9762a3f0f (patch) | |
tree | 2c63103828369b86ed0c1614741c95e83e3f6059 | |
parent | d69b1d414760eba09b19e432d67f82e91620d543 (diff) | |
download | horizon-27887e356f4c7a62d20d75b15dc08ac9762a3f0f.tar.gz |
Fix maximum recursion depth error when generating documentation20.1.1
Troubleshooting an issue with Senlin documentation,
> RecursionError: maximum recursion depth exceeded in __instancecheck__
it turns out that attrs['base_options'] creates a recursive reference
when no base classes have 'base_options'.
This happens when BaseAction is created.
Closes-Bug: #1955773
Change-Id: I2724f07339134b3e06b7ea925939bf7072162106
(cherry picked from commit b8cc0043d46318c7e11952109450587bee9567ab)
-rw-r--r-- | horizon/tables/actions.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/horizon/tables/actions.py b/horizon/tables/actions.py index 25c452392..ad8945a4f 100644 --- a/horizon/tables/actions.py +++ b/horizon/tables/actions.py @@ -52,7 +52,10 @@ class BaseActionMetaClass(type): # Options of action are set as class attributes, loading them. options = {} if attrs: - options = attrs + # NOTE: It is required to create a new dict object + # to avoid a recursive reference when no parent class + # has 'base_options' attribute. + options = dict(attrs) # Iterate in reverse to preserve final order for base in bases[::-1]: |