Commit 0dd922b6 authored by Martin van Es's avatar Martin van Es
Browse files

Remove redundant MData class

parent 116fa91f
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment