Merge pull request #1134 from samdfonseca/python2-svn-show-proxy

explicitly use python2 for svn proxy functions
pull/1135/head
Nils Winkler 2018-01-21 12:16:30 +01:00 committed by GitHub
commit a9b606eaab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -236,11 +236,11 @@ svn-show-proxy ()
about 'Shows SVN proxy settings'
group 'proxy'
if $(command -v svn &> /dev/null) && $(command -v python &> /dev/null) ; then
if $(command -v svn &> /dev/null) && $(command -v python2 &> /dev/null) ; then
echo ""
echo "SVN Proxy Settings"
echo "=================="
python - <<END
python2 - <<END
import ConfigParser, os
config = ConfigParser.ConfigParser()
config.read(os.path.expanduser('~/.subversion/servers'))
@ -266,8 +266,8 @@ svn-disable-proxy ()
about 'Disables SVN proxy settings'
group 'proxy'
if $(command -v svn &> /dev/null) && $(command -v python &> /dev/null) ; then
python - <<END
if $(command -v svn &> /dev/null) && $(command -v python2 &> /dev/null) ; then
python2 - <<END
import ConfigParser, os
config = ConfigParser.ConfigParser()
config.read(os.path.expanduser('~/.subversion/servers'))
@ -295,10 +295,10 @@ svn-enable-proxy ()
about 'Enables SVN proxy settings'
group 'proxy'
if $(command -v svn &> /dev/null) && $(command -v python &> /dev/null) ; then
if $(command -v svn &> /dev/null) && $(command -v python2 &> /dev/null) ; then
local my_http_proxy=${1:-$BASH_IT_HTTP_PROXY}
python - "$my_http_proxy" "$BASH_IT_NO_PROXY" <<END
python2 - "$my_http_proxy" "$BASH_IT_NO_PROXY" <<END
import ConfigParser, os, sys, urlparse
pieces = urlparse.urlparse(sys.argv[1])
host = pieces.hostname