summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
Diffstat (limited to 'project.py')
-rw-r--r--project.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/project.py b/project.py
index db380a09..e0703519 100644
--- a/project.py
+++ b/project.py
@@ -440,7 +440,8 @@ class RepoHook(object):
440 # and convert to a HookError w/ just the failing traceback. 440 # and convert to a HookError w/ just the failing traceback.
441 context = {} 441 context = {}
442 try: 442 try:
443 execfile(self._script_fullpath, context) 443 exec(compile(open(self._script_fullpath).read(),
444 self._script_fullpath, 'exec'), context)
444 except Exception: 445 except Exception:
445 raise HookError('%s\nFailed to import %s hook; see traceback above.' % ( 446 raise HookError('%s\nFailed to import %s hook; see traceback above.' % (
446 traceback.format_exc(), self._hook_type)) 447 traceback.format_exc(), self._hook_type))
@@ -2324,8 +2325,8 @@ class Project(object):
2324 out = iter(out[:-1].split('\0')) # pylint: disable=W1401 2325 out = iter(out[:-1].split('\0')) # pylint: disable=W1401
2325 while out: 2326 while out:
2326 try: 2327 try:
2327 info = out.next() 2328 info = next(out)
2328 path = out.next() 2329 path = next(out)
2329 except StopIteration: 2330 except StopIteration:
2330 break 2331 break
2331 2332
@@ -2351,7 +2352,7 @@ class Project(object):
2351 info = _Info(path, *info) 2352 info = _Info(path, *info)
2352 if info.status in ('R', 'C'): 2353 if info.status in ('R', 'C'):
2353 info.src_path = info.path 2354 info.src_path = info.path
2354 info.path = out.next() 2355 info.path = next(out)
2355 r[info.path] = info 2356 r[info.path] = info
2356 return r 2357 return r
2357 finally: 2358 finally: