Show More
@@ -27,13 +27,13 b' def _pythonhook(ui, repo, name, hname, f' | |||||
27 | raise util.Abort(_('%s hook is invalid ("%s" not in ' |
|
27 | raise util.Abort(_('%s hook is invalid ("%s" not in ' | |
28 | 'a module)') % (hname, funcname)) |
|
28 | 'a module)') % (hname, funcname)) | |
29 | modname = funcname[:d] |
|
29 | modname = funcname[:d] | |
30 |
oldpaths = sys.path |
|
30 | oldpaths = sys.path | |
31 | if hasattr(sys, "frozen"): |
|
31 | if hasattr(sys, "frozen"): | |
32 | # binary installs require sys.path manipulation |
|
32 | # binary installs require sys.path manipulation | |
33 |
path, |
|
33 | modpath, modfile = os.path.split(modname) | |
34 |
if path and |
|
34 | if modpath and modfile: | |
35 |
sys.path. |
|
35 | sys.path = sys.path[:] + [modpath] | |
36 |
modname = |
|
36 | modname = modfile | |
37 | try: |
|
37 | try: | |
38 | obj = __import__(modname) |
|
38 | obj = __import__(modname) | |
39 | except ImportError: |
|
39 | except ImportError: |
General Comments 0
You need to be logged in to leave comments.
Login now