From cf41124e5a3c149f26819166604b131ceab2197a Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Fri, 18 Oct 2013 11:28:15 -0400 Subject: [PATCH] Remove .pyc files before generating sample conf. Updates the generate_samples.sh script so that we remove .pyc files in the nova source tree before generating the sample file. If you don't run unit tests the .pyc files won't get regenerated. This can cause cryptic errors if you run tests, switch branches, and then try to regenerate your config files if there are module differences, etc. Change-Id: I784a22c1cd7fb2c69ea1d9e02f87bd7da19d76aa --- tools/config/generate_sample.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/config/generate_sample.sh b/tools/config/generate_sample.sh index 643006f80f..807883e1f2 100755 --- a/tools/config/generate_sample.sh +++ b/tools/config/generate_sample.sh @@ -73,6 +73,7 @@ then fi BASEDIRESC=`echo $BASEDIR | sed -e 's/\//\\\\\//g'` +find $TARGETDIR -type f -name "*.pyc" -delete FILES=$(find $TARGETDIR -type f -name "*.py" ! -path "*/tests/*" \ -exec grep -l "Opt(" {} + | sed -e "s/^$BASEDIRESC\///g" | sort -u)