From eb890d98739196b83f1ecb5cb7bcfe9739a9502c Mon Sep 17 00:00:00 2001 From: Michele Simionato Date: Fri, 27 Jul 2018 12:55:36 +0200 Subject: Added the path to the decorator module in the virtual file path --- src/decorator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/decorator.py b/src/decorator.py index 44303ee..dceca03 100644 --- a/src/decorator.py +++ b/src/decorator.py @@ -173,7 +173,8 @@ class FunctionMaker(object): # Ensure each generated function has a unique filename for profilers # (such as cProfile) that depend on the tuple of (, # , ) being unique. - filename = '' % (next(self._compile_count),) + filename = '<%s:decorator-gen-%d>' % ( + __file__, next(self._compile_count)) try: code = compile(src, filename, 'single') exec(code, evaldict) -- cgit v1.2.1