diff --git a/plover_python_dictionary.py b/plover_python_dictionary.py index f1727bb..90cdf36 100644 --- a/plover_python_dictionary.py +++ b/plover_python_dictionary.py @@ -20,7 +20,7 @@ def _load(self, filename): with open(filename, encoding='utf-8') as fp: source = fp.read() mod = {} - exec(source, mod) + exec(compile(source, filename, 'exec'), mod) longest_key = mod.get('LONGEST_KEY') if not isinstance(longest_key, int) or longest_key <= 0: raise ValueError('missing or invalid `LONGEST_KEY\' constant: %s\n' % longest_key)