Remove all *.pyc files in $DEST when executing clean.sh

Currentlly, the *.pyc files could not be removed in any scripts or
functions. But the redundant files would lead stack.sh not to find the
correct script for some versions after branch switched from master to
stable/mitaka in migration_helpers.sync_database_to_version.

So this commit adds the process of cleaning all the *.pyc files in
clean.sh.

It is needed to execute clean.sh before re-stack.sh to prevent the
exception.

Change-Id: I9ba0674d6b20b13c0a26b22cd5d1939daa121a94
Closes-Bug: #1599124
This commit is contained in:
WenyanZhang 2016-07-07 18:57:32 +08:00
parent 8e64c478eb
commit 8f0e97c146
1 changed files with 5 additions and 0 deletions

View File

@ -145,3 +145,8 @@ for file in $FILES_TO_CLEAN; do
done
rm -rf ~/.config/openstack
# Clean up all *.pyc files
if [[ -n "$DEST" ]] && [[ -d "$DEST" ]]; then
sudo find $DEST -name "*.pyc" -print0 | xargs -0 rm
fi