~pwlars/uci-engine/rabbit-adbworker-charm

« back to all changes in this revision

Viewing changes to charms/precise/rabbitmq-worker/hooks/hooks.py

  • Committer: Ubuntu CI Bot
  • Author(s): Celso Providelo
  • Date: 2014-05-23 14:49:24 UTC
  • mfrom: (505.1.6 uci-charms-staging)
  • Revision ID: ubuntu_ci_bot-20140523144924-99fxwu9go17x37rb
[r=PS Jenkins bot, Evan Dandrea] Updating our charms to cope with prodstack guidelines  from Celso Providelo

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
16
 
17
17
import base64
 
18
import glob
 
19
import json
18
20
import os
19
 
import json
20
21
import shutil
21
22
import subprocess
22
23
import sys
107
108
 
108
109
 
109
110
def install(config, upgrade=False):
 
111
    # Support Canonistack/Prodstack basenode subordinate charm interface.
 
112
    for f in glob.glob('exec.d/*/charm-pre-install'):
 
113
        if os.path.isfile(f) and os.access(f, os.X_OK):
 
114
            subprocess.check_call(['sh', '-c', f])
 
115
 
110
116
    if upgrade:
111
117
        charmhelpers.fetch.apt_update()
112
118
    else: