diff --git a/kallithea/lib/middleware/simplegit.py b/kallithea/lib/middleware/simplegit.py --- a/kallithea/lib/middleware/simplegit.py +++ b/kallithea/lib/middleware/simplegit.py @@ -37,7 +37,7 @@ from webob.exc import HTTPNotFound, HTTP HTTPNotAcceptable from kallithea.model.db import Ui -from kallithea.lib.utils2 import safe_str, safe_unicode, fix_PATH, get_server_url, \ +from kallithea.lib.utils2 import safe_str, safe_unicode, get_server_url, \ _set_extras from kallithea.lib.base import BaseVCSController from kallithea.lib.utils import make_ui, is_valid_repo @@ -114,7 +114,6 @@ class SimpleGit(BaseVCSController): #=================================================================== # GIT REQUEST HANDLING #=================================================================== - fix_PATH() log.debug('HOOKS extras is %s', extras) baseui = make_ui() _set_extras(extras or {}) diff --git a/kallithea/lib/middleware/simplehg.py b/kallithea/lib/middleware/simplehg.py --- a/kallithea/lib/middleware/simplehg.py +++ b/kallithea/lib/middleware/simplehg.py @@ -36,7 +36,7 @@ import urllib from webob.exc import HTTPNotFound, HTTPForbidden, HTTPInternalServerError, \ HTTPNotAcceptable, HTTPBadRequest -from kallithea.lib.utils2 import safe_str, safe_unicode, fix_PATH, get_server_url, \ +from kallithea.lib.utils2 import safe_str, safe_unicode, get_server_url, \ _set_extras from kallithea.lib.base import BaseVCSController from kallithea.lib.utils import make_ui, is_valid_repo @@ -140,7 +140,6 @@ class SimpleHg(BaseVCSController): repo_path = os.path.join(safe_str(self.basepath), str_repo_name) log.debug('Repository path is %s', repo_path) - fix_PATH() log.debug('HOOKS extras is %s', extras) baseui = make_ui(repo_path=repo_path) _set_extras(extras or {}) diff --git a/kallithea/lib/utils2.py b/kallithea/lib/utils2.py --- a/kallithea/lib/utils2.py +++ b/kallithea/lib/utils2.py @@ -506,21 +506,6 @@ class AttributeDict(dict): __delattr__ = dict.__delitem__ -def fix_PATH(os_=None): - """ - Get current active python path, and append it to PATH variable to fix issues - of subprocess calls and different python versions - """ - if os_ is None: - import os - else: - os = os_ - - cur_path = os.path.split(sys.executable)[0] - if not os.environ['PATH'].startswith(cur_path): - os.environ['PATH'] = '%s:%s' % (cur_path, os.environ['PATH']) - - def obfuscate_url_pw(engine): from sqlalchemy.engine import url as sa_url from sqlalchemy.exc import ArgumentError