Merge ~barryprice/apache2-charm/+git/apache2-charm:master into apache2-charm:master

Proposed by Barry Price
Status: Merged
Approved by: Haw Loeung
Approved revision: bffdf7575b45dd6f9972ec79be3a49f9d3234c0f
Merged at revision: 4165c49d2de53e93f92f765dc857e41837e1e4e1
Proposed branch: ~barryprice/apache2-charm/+git/apache2-charm:master
Merge into: apache2-charm:master
Diff against target: 43 lines (+5/-8)
2 files modified
Makefile (+2/-2)
hooks/install (+3/-6)
Reviewer Review Type Date Requested Status
Haw Loeung +1 Approve
Canonical IS Reviewers Pending
Review via email: mp+428313@code.launchpad.net

Commit message

Make all python calls explicitly python2, to avoid any ambiguity when we finally port this to python3

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Haw Loeung (hloeung) wrote :

LGTM

review: Approve (+1)
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 4165c49d2de53e93f92f765dc857e41837e1e4e1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Makefile b/Makefile
2index d4f9cb5..82a7396 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -4,7 +4,7 @@ HOOKS_DIR := $(PWD)/hooks
6 TEST_PREFIX := PYTHONPATH=$(HOOKS_DIR)
7 TEST_DIR := $(PWD)/hooks/tests
8 CHARM_DIR := $(PWD)
9-PYTHON := /usr/bin/env python
10+PYTHON2 := /usr/bin/env python2
11
12
13 build: test lint proof
14@@ -43,7 +43,7 @@ sourcedeps:
15 @echo Updating source dependencies...
16 @mkdir -p build
17 @git clone lp:charm-helpers build/charm-helpers
18- @$(PYTHON) build/charm-helpers/tools/charm_helpers_sync/charm_helpers_sync.py \
19+ @$(PYTHON2) build/charm-helpers/tools/charm_helpers_sync/charm_helpers_sync.py \
20 -c charm-helpers.yaml \
21 -r build/charm-helpers \
22 -d hooks/charmhelpers
23diff --git a/hooks/install b/hooks/install
24index 5bd0001..c808b3c 100755
25--- a/hooks/install
26+++ b/hooks/install
27@@ -12,13 +12,10 @@ DISTRIB_CODENAME=$(grep DISTRIB_CODENAME /etc/lsb-release | cut -d= -f2)
28 if [ "${DISTRIB_CODENAME}" = "focal" ]; then
29 juju-log 'Ensuring python2, python-apt and python-yaml are installed'
30 apt-get install -y python2 python-apt python-yaml
31-
32- juju-log 'Invoking python2-based install hook'
33- python2 hooks/hooks.py install
34 else
35 juju-log 'Ensuring python, python-apt and python-yaml are installed'
36 apt-get install -y python python-apt python-yaml
37-
38- juju-log 'Invoking python-based install hook'
39- python hooks/hooks.py install
40 fi
41+
42+juju-log 'Invoking python2-based install hook'
43+python2 hooks/hooks.py install

Subscribers

People subscribed via source and target branches

to all changes: