##// END OF EJS Templates
obsolete: use ProgrammingError over assert for volatile set registration...
Pierre-Yves David -
r32884:9d472b21 default
parent child Browse files
Show More
@@ -1273,7 +1273,9 b' cachefuncs = {}'
1273 1273 def cachefor(name):
1274 1274 """Decorator to register a function as computing the cache for a set"""
1275 1275 def decorator(func):
1276 assert name not in cachefuncs
1276 if name in cachefuncs:
1277 msg = "duplicated registration for volatileset '%s' (existing: %r)"
1278 raise error.ProgrammingError(msg % (name, cachefuncs[name]))
1277 1279 cachefuncs[name] = func
1278 1280 return func
1279 1281 return decorator
General Comments 0
You need to be logged in to leave comments. Login now