Merge lp:~joetalbott/charms/trusty/snappy-proposed-image-builder/fix_logging into lp:~canonical-ci-engineering/charms/trusty/snappy-proposed-image-builder/trunk

Proposed by Joe Talbott
Status: Merged
Approved by: Joe Talbott
Approved revision: 8
Merged at revision: 8
Proposed branch: lp:~joetalbott/charms/trusty/snappy-proposed-image-builder/fix_logging
Merge into: lp:~canonical-ci-engineering/charms/trusty/snappy-proposed-image-builder/trunk
Diff against target: 30 lines (+3/-3)
1 file modified
hooks/actions.py (+3/-3)
To merge this branch: bzr merge lp:~joetalbott/charms/trusty/snappy-proposed-image-builder/fix_logging
Reviewer Review Type Date Requested Status
Thomi Richards (community) Approve
Review via email: mp+261154@code.launchpad.net

Commit message

fix hookenv.log usage.

Description of the change

fix hookenv.log usage.

To post a comment you must log in.
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/actions.py'
2--- hooks/actions.py 2015-06-04 15:29:02 +0000
3+++ hooks/actions.py 2015-06-04 21:37:57 +0000
4@@ -32,7 +32,7 @@
5
6
7 def log_start(service_name):
8- hookenv.log('%s starting', SERVICE_NAME)
9+ hookenv.log('%s starting' % SERVICE_NAME)
10
11
12 def install_packages(service_name):
13@@ -58,7 +58,7 @@
14
15 def update_config_file(service_name):
16 hookenv.log(
17- 'Updating service configuration file: %s', SERVICE_CONFIGNAME)
18+ 'Updating service configuration file: %s' % SERVICE_CONFIGNAME)
19 config_content = base64.b64decode(config['config-file'])
20 config_path = os.path.join(_service_dir(), SERVICE_CONFIGNAME)
21 with open(config_path, 'w') as f:
22@@ -67,7 +67,7 @@
23
24 def create_user(service_name):
25 username = 'core-worker'
26- hookenv.log('Creating service user: %s', username)
27+ hookenv.log('Creating service user: %s' % username)
28 adduser(username)
29
30 # create user's home directory if it doesn't exist.

Subscribers

People subscribed via source and target branches