From e991f7da457e0f1343ca13e8adeb0f6334b04990 Mon Sep 17 00:00:00 2001 From: imacdonn Date: Thu, 4 Oct 2018 19:41:59 +0000 Subject: [PATCH] Use bash-style test for Fedora version Old-style test fails on Ubuntu when python3 enabled, with: .../devstack/inc/python: line 52: [: 16.04: integer expression expected Use bash-style test, which doesn't attempt to evaluate the RHS if the LHS evaluates to false Change-Id: If18031ab98c9060e5825c3a8d3c647bd3705cd9c Closes-Bug: #1796174 --- inc/python | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/python b/inc/python index 96be107dfa..d8b8169fa1 100644 --- a/inc/python +++ b/inc/python @@ -49,7 +49,7 @@ function get_python_exec_prefix { fi $xtrace - if python3_enabled && [ "$os_VENDOR" = "Fedora" -a $os_RELEASE -gt 26 ]; then + if python3_enabled && [[ "$os_VENDOR" == "Fedora" && $os_RELEASE -gt 26 ]]; then # Default Python 3 install prefix changed to /usr/local in Fedora 27: # https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe echo "/usr/local/bin"