diff options
author | Conley Owens <cco3@android.com> | 2014-05-07 18:18:55 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-05-07 18:18:56 +0000 |
commit | 5196805fa28aa8873f76b2baa7b0fd52ec52d915 (patch) | |
tree | 5f53332a6bc401cd372bc852fdec9a5eea366acb /project.py | |
parent | 85b24acd6a11af3d84cc71fc35ebdb6d3c78065f (diff) | |
parent | 70f6890352ef8f12cdc859b5a4eb0c4e8e37152c (diff) | |
download | git-repo-5196805fa28aa8873f76b2baa7b0fd52ec52d915.tar.gz |
Merge "Use exec() rather than execfile()"
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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)) |