Merge lp:~fo0bar/turku-charms/turku-agent-charm into lp:turku-charms/turku-agent-charm

Proposed by Ryan Finnie
Status: Merged
Merged at revision: 11
Proposed branch: lp:~fo0bar/turku-charms/turku-agent-charm
Merge into: lp:turku-charms/turku-agent-charm
Diff against target: 18 lines (+2/-3)
1 file modified
hooks/hooks.py (+2/-3)
To merge this branch: bzr merge lp:~fo0bar/turku-charms/turku-agent-charm
Reviewer Review Type Date Requested Status
Stuart Bishop Pending
Review via email: mp+367792@code.launchpad.net

Commit message

Convert payload turku-agent to Python 3

Description of the change

(yes, this charm is ancient and needs to be converted to reactive)

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/hooks.py'
2--- hooks/hooks.py 2018-05-02 18:13:31 +0000
3+++ hooks/hooks.py 2019-05-22 17:27:16 +0000
4@@ -29,12 +29,11 @@
5
6
7 def install():
8- # Xenial and later does not ship Python 2 by default.
9 subprocess.check_call(['apt-get', 'update'])
10- subprocess.check_call(['apt-get', '-y', 'install', 'python', 'python2.7', 'python-pkg-resources'])
11+ subprocess.check_call(['apt-get', '-y', 'install', 'python3', 'python3-pkg-resources'])
12
13 cwd = os.environ['CHARM_DIR']
14- subprocess.check_call(['python', 'setup.py', 'install'], cwd='%s/files/turku-agent' % cwd)
15+ subprocess.check_call(['python3', 'setup.py', 'install'], cwd='%s/files/turku-agent' % cwd)
16
17 shutil.copyfile('files/turku-agent/turku-agent.cron',
18 '/etc/cron.d/turku-agent')

Subscribers

People subscribed via source and target branches

to all changes: