Merge ~xavpaice/charm-nagios:lintfix into charm-nagios:master

Proposed by Xav Paice
Status: Merged
Approved by: James Troup
Approved revision: b286e8dc2f313258a7b4771a710606526426de6e
Merged at revision: 356cb9a457e5721975f26c9382c9e8d8162d4562
Proposed branch: ~xavpaice/charm-nagios:lintfix
Merge into: charm-nagios:master
Diff against target: 25 lines (+3/-2)
2 files modified
hooks/upgrade_charm.py (+1/-1)
tests/functional/test_config.py (+2/-1)
Reviewer Review Type Date Requested Status
Celia Wang Approve
🤖 prod-jenkaas-bootstack continuous-integration Approve
BootStack Reviewers Pending
Review via email: mp+406347@code.launchpad.net

Commit message

Minor lint fixes

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
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
Celia Wang (ziyiwang) wrote :

lgtm

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

Change successfully merged at revision 356cb9a457e5721975f26c9382c9e8d8162d4562

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/hooks/upgrade_charm.py b/hooks/upgrade_charm.py
2index 6338561..81b8875 100755
3--- a/hooks/upgrade_charm.py
4+++ b/hooks/upgrade_charm.py
5@@ -626,7 +626,7 @@ def update_password(account, password):
6 ["htpasswd", "-b", "/etc/nagios3/htpasswd.users", account, password]
7 )
8 else:
9- """ password was empty, it has been removed. We should delete the account """
10+ """password was empty, it has been removed. We should delete the account"""
11 os.path.isfile(account_file) and os.remove(account_file)
12 subprocess.call(["htpasswd", "-D", "/etc/nagios3/htpasswd.users", account])
13
14diff --git a/tests/functional/test_config.py b/tests/functional/test_config.py
15index a607878..2625ff2 100644
16--- a/tests/functional/test_config.py
17+++ b/tests/functional/test_config.py
18@@ -147,7 +147,8 @@ async def test_live_status(unit, livestatus_path, file_stat):
19 async def test_livestatus_xinetd(unit, livestatus_path, livestatus_socket, run_command):
20 assert livestatus_socket is True, "Livestatus xinetd is not enabled"
21 out = await run_command(
22- "echo -e 'GET hosts\nColumns: name\n' | nc 127.0.0.1 6557", unit.u)
23+ "echo -e 'GET hosts\nColumns: name\n' | nc 127.0.0.1 6557", unit.u
24+ )
25 assert "nagios" in out["Stdout"], "Livestatus output is not expected"
26
27

Subscribers

People subscribed via source and target branches

to all changes: