Skip to content

Commit e991f7d

Browse files
author
imacdonn
committed
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
1 parent bb99f1f commit e991f7d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

inc/python

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function get_python_exec_prefix {
4949
fi
5050
$xtrace
5151

52-
if python3_enabled && [ "$os_VENDOR" = "Fedora" -a $os_RELEASE -gt 26 ]; then
52+
if python3_enabled && [[ "$os_VENDOR" == "Fedora" && $os_RELEASE -gt 26 ]]; then
5353
# Default Python 3 install prefix changed to /usr/local in Fedora 27:
5454
# https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
5555
echo "/usr/local/bin"

0 commit comments

Comments
 (0)