summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--project.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/project.py b/project.py
index 897f4c90..55c188db 100644
--- a/project.py
+++ b/project.py
@@ -438,7 +438,8 @@ class RepoHook(object):
438 # and convert to a HookError w/ just the failing traceback. 438 # and convert to a HookError w/ just the failing traceback.
439 context = {} 439 context = {}
440 try: 440 try:
441 execfile(self._script_fullpath, context) 441 exec(compile(open(self._script_fullpath).read(),
442 self._script_fullpath, 'exec'), context)
442 except Exception: 443 except Exception:
443 raise HookError('%s\nFailed to import %s hook; see traceback above.' % ( 444 raise HookError('%s\nFailed to import %s hook; see traceback above.' % (
444 traceback.format_exc(), self._hook_type)) 445 traceback.format_exc(), self._hook_type))