Commit 63b5c4c2 authored by Killian Lufau's avatar Killian Lufau Committed by Julien Muchembled

Fix attribute deletion when updating config

The received network parameter name can have a ':json' suffix that
is not present in the class attribute of this parameter.
This suffix was not removed and could cause attribute deletion to fail.

/reviewed-on nexedi/re6stnet!20
parent 85045501
...@@ -121,7 +121,7 @@ class Cache(object): ...@@ -121,7 +121,7 @@ class Cache(object):
old[k] = v old[k] = v
continue continue
try: try:
delattr(self, k) delattr(self, k[:-5] if k.endswith(':json') else k)
except AttributeError: except AttributeError:
pass pass
remove.append(k) remove.append(k)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment