From 9d6cbea5cea40e536a1d649bff3b5e18c50c5d5b Mon Sep 17 00:00:00 2001 From: Erik Rose Date: Wed, 2 Dec 2015 11:41:00 -0500 Subject: [PATCH] Fix some errors. Use the correct Python interpreter. Fix a syntax error. Fix a missing import. --- letsencrypt_auto/letsencrypt-auto.template | 5 ++--- letsencrypt_auto/pieces/download_upgrade.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/letsencrypt_auto/letsencrypt-auto.template b/letsencrypt_auto/letsencrypt-auto.template index b20187506..0c153c2f2 100755 --- a/letsencrypt_auto/letsencrypt-auto.template +++ b/letsencrypt_auto/letsencrypt-auto.template @@ -169,7 +169,6 @@ elif [ "$1" != "--_skip-to-install" ]; then else virtualenv --no-site-packages --python $LE_PYTHON $VENV_PATH > /dev/null fi - NEXT: Is all this stuff in the right if branch? # Now we drop into Python so we don't have to install even more # dependencies (curl, etc.), for better flow control, and for the @@ -179,7 +178,7 @@ elif [ "$1" != "--_skip-to-install" ]; then # containing a new copy of letsencrypt-auto or returns non-zero. # There is no $ interpolation due to quotes on heredoc delimiters. set +e - TEMP_DIR=`$PYTHON - << "UNLIKELY_EOF" + TEMP_DIR=`$LE_PYTHON - << "UNLIKELY_EOF" {{ download_upgrade.py }} UNLIKELY_EOF` DOWNLOAD_STATUS=$? @@ -213,7 +212,7 @@ UNLIKELY_EOF UNLIKELY_EOF set +e - PEEP_OUT=`$PYTHON $TEMP_DIR/peep.py install -r $TEMP_DIR/letsencrypt-auto-requirements.txt` + PEEP_OUT=`$LE_PYTHON $TEMP_DIR/peep.py install -r $TEMP_DIR/letsencrypt-auto-requirements.txt` PEEP_STATUS=$? set -e if [ "$PEEP_STATUS" = 0 ]; then diff --git a/letsencrypt_auto/pieces/download_upgrade.py b/letsencrypt_auto/pieces/download_upgrade.py index 27e1b28d8..a117e9e0a 100644 --- a/letsencrypt_auto/pieces/download_upgrade.py +++ b/letsencrypt_auto/pieces/download_upgrade.py @@ -1,7 +1,7 @@ from distutils.version import LooseVersion from json import loads from os import devnull -from os.path import join +from os.path import dirname, join import re from subprocess import check_call, CalledProcessError from sys import exit