Merge lp:~dpb/juju-deployer/charm-url-relative into lp:juju-deployer

Proposed by David Britton
Status: Merged
Merged at revision: 192
Proposed branch: lp:~dpb/juju-deployer/charm-url-relative
Merge into: lp:juju-deployer
Diff against target: 13 lines (+2/-1)
1 file modified
deployer/charm.py (+2/-1)
To merge this branch: bzr merge lp:~dpb/juju-deployer/charm-url-relative
Reviewer Review Type Date Requested Status
Tim Van Steenburgh Pending
Review via email: mp+305676@code.launchpad.net

Commit message

return abs path if in juju2 for charm_url

Description of the change

Fix for linked bug. -- return abs path if in juju2. Other cases use charm urls, not paths.

To post a comment you must log in.
Revision history for this message
Tim Van Steenburgh (tvansteenburgh) wrote :

LGTM, thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'deployer/charm.py'
2--- deployer/charm.py 2016-07-12 02:29:52 +0000
3+++ deployer/charm.py 2016-09-14 02:32:48 +0000
4@@ -146,7 +146,8 @@
5 if self._charm_url:
6 return self._charm_url
7 if get_juju_major_version() > 1:
8- return self.path
9+ # lp:1579804 - juju2 needs fully qualified paths
10+ return os.path.abspath(self.path)
11 series = os.path.basename(os.path.dirname(self.path))
12 charm_name = self.metadata['name']
13 return "local:%s/%s" % (series, charm_name)

Subscribers

People subscribed via source and target branches