Merge lp:~ahasenack/charms/precise/rabbitmq-server/rabbitmq-server-juju-core-compat into lp:charms/rabbitmq-server

Proposed by Andreas Hasenack
Status: Merged
Approved by: Adam Gandelman
Approved revision: 42
Merged at revision: 42
Proposed branch: lp:~ahasenack/charms/precise/rabbitmq-server/rabbitmq-server-juju-core-compat
Merge into: lp:charms/rabbitmq-server
Diff against target: 21 lines (+3/-3)
2 files modified
hooks/lib/openstack_common.py (+2/-2)
revision (+1/-1)
To merge this branch: bzr merge lp:~ahasenack/charms/precise/rabbitmq-server/rabbitmq-server-juju-core-compat
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+177231@code.launchpad.net

Description of the change

Use CHARM_DIR instead of a hardcoded path for the local charm directory. This makes this charm compatible with both pyjuju and juju-core, where it was broken before.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/lib/openstack_common.py'
2--- hooks/lib/openstack_common.py 2013-04-01 19:47:19 +0000
3+++ hooks/lib/openstack_common.py 2013-07-26 23:09:25 +0000
4@@ -221,8 +221,8 @@
5 updated config information necessary to perform health checks or
6 service changes.
7 """
8- unit_name = os.getenv('JUJU_UNIT_NAME').replace('/', '-')
9- juju_rc_path = "/var/lib/juju/units/%s/charm/%s" % (unit_name, script_path)
10+ charm_dir = os.getenv('CHARM_DIR')
11+ juju_rc_path = "%s/%s" % (charm_dir, script_path)
12 with open(juju_rc_path, 'wb') as rc_script:
13 rc_script.write(
14 "#!/bin/bash\n")
15
16=== modified file 'revision'
17--- revision 2013-06-06 15:33:12 +0000
18+++ revision 2013-07-26 23:09:25 +0000
19@@ -1,1 +1,1 @@
20-95
21+96

Subscribers

People subscribed via source and target branches