Remove old .pyc files

Avoid Byte code errors: bad magic number in 'ceph': b'\x03\xf3\r\n'

Change-Id: I156803991b2b3783ef633837a3945f50a86ef0dc
Closes-Bug: #1825392
This commit is contained in:
David Ames 2019-04-19 08:32:52 -07:00
parent 805b56980f
commit 3d48451dd7

View File

@ -1,4 +1,9 @@
#!/bin/bash -e
# Re-install dependencies to deal with py2->py3 switch for charm
# Wrapper to ensure that old python bytecode isn't hanging around
# after we upgrade the charm with newer libraries
find . -iname '*.pyc' -delete
find . -name '__pycache__' -prune -exec rm -rf "{}" \;
# Re-install dependencies to deal with py2->py3 switch for charm
./hooks/install_deps