summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Miller <james.miller@reannz.co.nz>2022-03-04 16:10:51 +1300
committerJames Miller <james.miller@reannz.co.nz>2022-03-04 16:10:51 +1300
commitbf0a4e67b9cc4f1d9ecbe5f8bd74a2aa22bbc5a2 (patch)
tree6f0804249b40cfa6aabb6fc6b92acdb8d591e8c3
parenta5c700f0b998808c2d94ba69d257ce9534b8445e (diff)
downloadpysaml2-bf0a4e67b9cc4f1d9ecbe5f8bd74a2aa22bbc5a2.tar.gz
Add comments to MetadataStore.reload
-rw-r--r--src/saml2/mdstore.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/saml2/mdstore.py b/src/saml2/mdstore.py
index a1bccb72..120e4fc8 100644
--- a/src/saml2/mdstore.py
+++ b/src/saml2/mdstore.py
@@ -1111,11 +1111,14 @@ class MetadataStore(MetaData):
self.metadata[key] = _md
def reload(self, spec):
+ # Save the old set of metadata
old_metadata = self.metadata
self.metadata = {}
try:
+ # Reload the metadata based on the spec
self.imp(spec)
except Exception as e:
+ # Something went wrong, restore the previous metadata
self.metadata = old_metadata
raise e