Commit 08ea1b10 authored by Hanno Schlichting's avatar Hanno Schlichting

Factor out cid calculation

parent 8669d107
...@@ -116,14 +116,16 @@ class CatalogPlan(object): ...@@ -116,14 +116,16 @@ class CatalogPlan(object):
self.query = query self.query = query
self.key = make_key(catalog, query) self.key = make_key(catalog, query)
self.threshold = threshold self.threshold = threshold
self.cid = self.get_id()
parent = aq_parent(catalog) def get_id(self):
parent = aq_parent(self.catalog)
path = getattr(aq_base(parent), 'getPhysicalPath', None) path = getattr(aq_base(parent), 'getPhysicalPath', None)
if path is None: if path is None:
path = ('', 'NonPersistentCatalog') path = ('', 'NonPersistentCatalog')
else: else:
path = tuple(parent.getPhysicalPath()) path = tuple(parent.getPhysicalPath())
self.cid = path return path
def init_timer(self): def init_timer(self):
self.res = [] self.res = []
......
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