diff --git a/debian/changelog b/debian/changelog index b5b4569f..df24462c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,9 @@ byobu (5.71) unreleased; urgency=low which is a bummer - also, there's more work to be done, in order to enable/disable this via F9/byobu-config + * usr/lib/byobu/include/constants: LP: #1278446 + - ensure that we pick a python that has a proper snack module + installed -- Dustin Kirkland Thu, 16 Jan 2014 17:48:35 -0600 diff --git a/usr/lib/byobu/include/constants b/usr/lib/byobu/include/constants index 58cc782e..e3347f63 100755 --- a/usr/lib/byobu/include/constants +++ b/usr/lib/byobu/include/constants @@ -55,12 +55,12 @@ $BYOBU_TEST ulimit >/dev/null 2>&1 && export BYOBU_ULIMIT="ulimit" || export BYO # Find a suitable python interpreter, if undefined if [ -z "$BYOBU_PYTHON" ]; then - if $BYOBU_TEST python >/dev/null 2>&1; then - BYOBU_PYTHON="python" - elif $BYOBU_TEST python2 >/dev/null 2>&1; then - BYOBU_PYTHON="python2" - elif $BYOBU_TEST python3 >/dev/null 2>&1; then + if python3 -c "import snack" >/dev/null 2>&1; then BYOBU_PYTHON="python3" + elif python2 -c "import snack" >/dev/null 2>&1; then + BYOBU_PYTHON="python2" + elif python -c "import snack" >/dev/null 2>&1; then + BYOBU_PYTHON="python" fi fi