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
This commit is contained in:
Dan Prince 2013-10-18 11:28:15 -04:00
parent 531adcd3d9
commit cf41124e5a

View File

@ -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)