Merge lp:~frankban/charms/precise/juju-gui/bug-1132905-log-hook into lp:~juju-gui/charms/precise/juju-gui/trunk
Proposed by
Francesco Banconi
Status: | Merged |
---|---|
Merged at revision: | 32 |
Proposed branch: | lp:~frankban/charms/precise/juju-gui/bug-1132905-log-hook |
Merge into: | lp:~juju-gui/charms/precise/juju-gui/trunk |
Diff against target: |
285 lines (+83/-41) 6 files modified
hooks/config-changed (+2/-11) hooks/install (+4/-14) hooks/start (+2/-6) hooks/stop (+6/-10) hooks/utils.py (+23/-0) tests/test_utils.py (+46/-0) |
To merge this branch: | bzr merge lp:~frankban/charms/precise/juju-gui/bug-1132905-log-hook |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email: mp+150413@code.launchpad.net |
Description of the change
Add and use a log_hook context manager.
Replace the current calls to log_entry and log_exit in the __main__ of
the hooks with a log_hook context manager, simplifying the code a bit.
Avoiding log_entry and log_exit also temporarily works around a problem
they have with the juju-core handling of strings starting with "--" in
juju-log.
To post a comment you must log in.
Reviewers: mp+150413_ code.launchpad. net,
Message:
Please take a look.
Description:
Add and use a log_hook context manager.
Replace the current calls to log_entry and log_exit in the __main__ of
the hooks with a log_hook context manager, simplifying the code a bit.
Avoiding log_entry and log_exit also temporarily works around a problem
they have with the juju-core handling of strings starting with "--" in
juju-log.
https:/ /code.launchpad .net/~frankban/ charms/ precise/ juju-gui/ bug-1132905- log-hook/ +merge/ 150413
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/7379050/
Affected files: changed
A [revision details]
M hooks/config-
M hooks/install
M hooks/start
M hooks/stop
M hooks/utils.py
M tests/test_utils.py