mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 08:35:26 +00:00
7cb9e2d0f9
--HG-- extra : rebase_source : a69885827a1b04b20bf90de973370b25558ee652 extra : source : 96f074457b2f003283e2fa3cbf523dea39beabba
21 lines
541 B
Python
21 lines
541 B
Python
from taskcluster_graph.slugid import slugid
|
|
|
|
class SlugidJar():
|
|
'''
|
|
Container of seen slugid's used to implement the as_slugid functionality
|
|
used in the task graph templates.
|
|
'''
|
|
def __init__(self):
|
|
self._names = {}
|
|
|
|
def __call__(self, name):
|
|
'''
|
|
So this object can easily be passed to mustache we allow it to be called
|
|
directly...
|
|
'''
|
|
if name in self._names:
|
|
return self._names[name];
|
|
|
|
self._names[name] = slugid()
|
|
return self._names[name]
|