* usr/lib/byobu/include/constants: LP: #1278446

- ensure that we pick a python that has a proper snack module
    installed
This commit is contained in:
Dustin Kirkland 2014-02-10 15:36:58 -06:00
commit 8b16673d07
2 changed files with 8 additions and 5 deletions

3
debian/changelog vendored
View file

@ -14,6 +14,9 @@ byobu (5.71) unreleased; urgency=low
which is a bummer which is a bummer
- also, there's more work to be done, in order to enable/disable - also, there's more work to be done, in order to enable/disable
this via F9/byobu-config 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 <kirkland@ubuntu.com> Thu, 16 Jan 2014 17:48:35 -0600 -- Dustin Kirkland <kirkland@ubuntu.com> Thu, 16 Jan 2014 17:48:35 -0600

View file

@ -55,12 +55,12 @@ $BYOBU_TEST ulimit >/dev/null 2>&1 && export BYOBU_ULIMIT="ulimit" || export BYO
# Find a suitable python interpreter, if undefined # Find a suitable python interpreter, if undefined
if [ -z "$BYOBU_PYTHON" ]; then if [ -z "$BYOBU_PYTHON" ]; then
if $BYOBU_TEST python >/dev/null 2>&1; then if python3 -c "import snack" >/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
BYOBU_PYTHON="python3" 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
fi fi