Merge "Ensure __pycache__ folder is deleted"

This commit is contained in:
Zuul 2018-07-14 12:39:14 +00:00 committed by Gerrit Code Review
commit aeba0d873e

View File

@ -134,7 +134,9 @@
# to https://github.com/pypa/virtualenv/issues/565
- name: Update virtualenv path
shell: |
set -o errexit
find {{ nova_bin }} -name \*.pyc -delete
if test -d {{ nova_bin }}/__pycache__; then rmdir {{ nova_bin }}/__pycache__; fi
sed -si '1s/^.*python.*$/#!{{ nova_bin | replace ('/','\/') }}\/python/' {{ nova_bin }}/*
virtualenv {{ nova_bin | dirname }} \
{{ (ansible_pkg_mgr == 'apt') | ternary('--always-copy', '') }} \