Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
add __file__ attribute when load .py config file
Browse files Browse the repository at this point in the history
  • Loading branch information
luoxiaohei committed Oct 22, 2019
1 parent e5d48d6 commit 81736ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orator/commands/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _get_config(self, path=None):
config = {}

with open(path) as fh:
exec(fh.read(), {}, config)
exec(fh.read(), {"__file__": path}, config)
else:
raise RuntimeError("Config file [%s] is not supported." % path)

Expand Down

0 comments on commit 81736ab

Please sign in to comment.