From 23998d8f68c106762743338d4998b7cd7febeca6 Mon Sep 17 00:00:00 2001 From: Martin van Es <martin@mrvanes.com> Date: Fri, 21 Jan 2022 09:51:23 +0100 Subject: [PATCH] WIP --- mdserver.py | 3 ++- utils.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mdserver.py b/mdserver.py index a1263ae..8fed186 100755 --- a/mdserver.py +++ b/mdserver.py @@ -30,4 +30,5 @@ for domain, values in config.items(): server.add_watch(domain, location) -app.run(host='127.0.0.1', port=5001) +if __name__ == "__main__": + app.run(host='127.0.0.1', port=5001, debug=False) diff --git a/utils.py b/utils.py index cd66514..6fffdcd 100755 --- a/utils.py +++ b/utils.py @@ -49,7 +49,8 @@ class Resource: self._read_metadata(mdfile) def _read_metadata(self, mdfile): - print("--- READ METADATA --") + print("\n--- READ METADATA --") + print(mdfile) found = 0 removed = 0 old_idps = self.mdfiles[mdfile].copy() @@ -65,7 +66,7 @@ class Resource: for entity_descriptor in root.findall('md:EntityDescriptor', ns): entityID = entity_descriptor.attrib.get('entityID', 'none') sha1 = hasher(entityID) - print(f"{{sha1}}{sha1} {entityID}") + print(f" {{sha1}}{sha1} {entityID}") entity_descriptor.set('validUntil', validUntil) entity_descriptor.set('cacheDuration', cacheDuration) entity = Entity() -- GitLab