diff options
author | James Miller <james.miller@reannz.co.nz> | 2022-03-04 16:10:51 +1300 |
---|---|---|
committer | James Miller <james.miller@reannz.co.nz> | 2022-03-04 16:10:51 +1300 |
commit | bf0a4e67b9cc4f1d9ecbe5f8bd74a2aa22bbc5a2 (patch) | |
tree | 6f0804249b40cfa6aabb6fc6b92acdb8d591e8c3 | |
parent | a5c700f0b998808c2d94ba69d257ce9534b8445e (diff) | |
download | pysaml2-bf0a4e67b9cc4f1d9ecbe5f8bd74a2aa22bbc5a2.tar.gz |
Add comments to MetadataStore.reload
-rw-r--r-- | src/saml2/mdstore.py | 3 |
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 |