Remove the compiled python bytecode
upgrade-charm could previously fail because of compiled bytecode remaining behind. This change makes the upgrade-charm hook remove any such compiled bytecode files Closes-Bug: 1628322 Change-Id: I37152749e553d1894430d2074bc7f82703dcc0cd
This commit is contained in:
parent
4d99f2853b
commit
95f23a9693
|
@ -537,7 +537,7 @@ def client_relation_changed():
|
|||
log('mon cluster not in quorum', level=DEBUG)
|
||||
|
||||
|
||||
@hooks.hook('upgrade-charm')
|
||||
@hooks.hook('upgrade-charm.real')
|
||||
@harden()
|
||||
def upgrade_charm():
|
||||
emit_cephconf()
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
ceph_hooks.py
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
# Wrapper to ensure that old python bytecode isn't hanging around
|
||||
# after we upgrade the charm with newer libraries
|
||||
rm -rf **/*.pyc
|
||||
|
||||
exec ./hooks/upgrade-charm.real
|
|
@ -0,0 +1 @@
|
|||
ceph_hooks.py
|
Loading…
Reference in New Issue