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
=== modified file 'hooks/actions.py'
--- hooks/actions.py 2015-06-04 15:29:02 +0000
+++ hooks/actions.py 2015-06-04 21:37:57 +0000
@@ -32,7 +32,7 @@
3232
3333
34def log_start(service_name):34def log_start(service_name):
35 hookenv.log('%s starting', SERVICE_NAME)35 hookenv.log('%s starting' % SERVICE_NAME)
3636
3737
38def install_packages(service_name):38def install_packages(service_name):
@@ -58,7 +58,7 @@
5858
59def update_config_file(service_name):59def update_config_file(service_name):
60 hookenv.log(60 hookenv.log(
61 'Updating service configuration file: %s', SERVICE_CONFIGNAME)61 'Updating service configuration file: %s' % SERVICE_CONFIGNAME)
62 config_content = base64.b64decode(config['config-file'])62 config_content = base64.b64decode(config['config-file'])
63 config_path = os.path.join(_service_dir(), SERVICE_CONFIGNAME)63 config_path = os.path.join(_service_dir(), SERVICE_CONFIGNAME)
64 with open(config_path, 'w') as f:64 with open(config_path, 'w') as f:
@@ -67,7 +67,7 @@
6767
68def create_user(service_name):68def create_user(service_name):
69 username = 'core-worker'69 username = 'core-worker'
70 hookenv.log('Creating service user: %s', username)70 hookenv.log('Creating service user: %s' % username)
71 adduser(username)71 adduser(username)
7272
73 # create user's home directory if it doesn't exist.73 # create user's home directory if it doesn't exist.

Subscribers

People subscribed via source and target branches