summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2013-10-18 11:28:15 -0400
committerDan Prince <dprince@redhat.com>2013-10-18 11:28:15 -0400
commitcf41124e5a3c149f26819166604b131ceab2197a (patch)
tree15798ed7c1f38b78142d48f14c3bda81db2525ff /tools
parent531adcd3d9d098bd784f56ce5e9e0d423e7f8a3d (diff)
downloadnova-cf41124e5a3c149f26819166604b131ceab2197a.tar.gz
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
Diffstat (limited to 'tools')
-rwxr-xr-xtools/config/generate_sample.sh1
1 files changed, 1 insertions, 0 deletions
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)