Skip to content

Commit

Permalink
Remove .pyc files before generating sample conf.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dprince committed Oct 18, 2013
1 parent 531adcd commit cf41124
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/config/generate_sample.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit cf41124

Please sign in to comment.