Skip to content

Commit bf0a4e6

Browse files
committed
Add comments to MetadataStore.reload
1 parent a5c700f commit bf0a4e6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/saml2/mdstore.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,11 +1111,14 @@ def load(self, *args, **kwargs):
11111111
self.metadata[key] = _md
11121112

11131113
def reload(self, spec):
1114+
# Save the old set of metadata
11141115
old_metadata = self.metadata
11151116
self.metadata = {}
11161117
try:
1118+
# Reload the metadata based on the spec
11171119
self.imp(spec)
11181120
except Exception as e:
1121+
# Something went wrong, restore the previous metadata
11191122
self.metadata = old_metadata
11201123
raise e
11211124

0 commit comments

Comments
 (0)