From 025fc5e5f5d7f92f0d0bda7032cf1782b029f28a Mon Sep 17 00:00:00 2001 From: Attila Fazekas Date: Tue, 13 Aug 2013 18:55:33 +0200 Subject: [PATCH] Faster old oslo.config detection Just search in the path where python searches for modules. Let's use python for searching, it knows the exact rules. Change-Id: I659f734c418ab5e56f4956f418af48dfbe054c8a --- lib/oslo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oslo b/lib/oslo index de5ec4e83e..449c4de17f 100644 --- a/lib/oslo +++ b/lib/oslo @@ -41,7 +41,7 @@ function install_oslo() { # cleanup_oslo() - purge possibly old versions of oslo function cleanup_oslo() { # this means we've got an old olso installed, lets get rid of it - if find /usr | grep oslo.config | grep -v oslo.config.egg-link > /dev/null; then + if ! python -c 'import oslo.config' 2>/dev/null; then echo "Found old oslo.config... removing to ensure consistency" local PIP_CMD=$(get_pip_command) pip_install olso.config