Merge lp:~canonical-ci-engineering/charms/trusty/logstash/local-tarball into lp:~lazypower/charms/trusty/logstash/trunk

Proposed by Celso Providelo
Status: Merged
Merged at revision: 45
Proposed branch: lp:~canonical-ci-engineering/charms/trusty/logstash/local-tarball
Merge into: lp:~lazypower/charms/trusty/logstash/trunk
Diff against target: 22 lines (+6/-6)
1 file modified
hooks/install (+6/-6)
To merge this branch: bzr merge lp:~canonical-ci-engineering/charms/trusty/logstash/local-tarball
Reviewer Review Type Date Requested Status
Charles Butler Approve
Review via email: mp+254639@code.launchpad.net

Commit message

Fixing local tarball/payload installation logic.

Description of the change

Fixing local tarball/payload installation logic.

To post a comment you must log in.
Revision history for this message
Charles Butler (lazypower) wrote :

+1 LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/install'
2--- hooks/install 2014-09-23 20:20:33 +0000
3+++ hooks/install 2015-03-30 19:49:09 +0000
4@@ -83,14 +83,14 @@
5 sha.hexdigest()))
6
7 # Extract and move into place
8- extract_package(filename)
9-
10-
11-def extract_package(filename):
12- t = tarfile.open(os.path.join(os.path.sep, 'tmp', filename))
13+ extract_package(fpath)
14+
15+
16+def extract_package(filepath):
17+ t = tarfile.open(filepath)
18 t.extractall(path='.')
19 t.close()
20- basename = filename.rsplit('.', 2)[0]
21+ [basename] = [v for v in os.listdir('.') if v.startswith('logstash-')]
22 shutil.move(basename, BASEPATH)
23
24

Subscribers

People subscribed via source and target branches