Skip to content
Snippets Groups Projects
Commit 0dd922b6 authored by Martin van Es's avatar Martin van Es
Browse files

Remove redundant MData class

parent 116fa91f
No related branches found
No related tags found
No related merge requests found
......@@ -30,15 +30,8 @@ class Entity:
self.valid_until = 0
self.cache_duration = 0
self.last_modified = 0
class MData(object):
def __init__(self):
self.md = None
self.max_age = (datetime.now(tz.tzutc()) +
timedelta(seconds=60))
self.last_modified = 0
self.valid_until = 0
class EventProcessor(pyinotify.ProcessEvent):
......@@ -158,7 +151,7 @@ class Realm:
else:
sha1 = hasher(entityID)
data = MData()
data = Entity()
if sha1 in self.__dict__:
signed_entity = self.__dict__[sha1]
if signed_entity.expires > datetime.now(tz.tzutc()):
......@@ -196,7 +189,7 @@ class Realm:
data = self.all_cache
else:
print("sign all")
data = MData()
data = Entity()
ns = NSMAP
root = ET.Element(f"{{{MD_NAMESPACE}}}EntitiesDescriptor",
nsmap=ns)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment