Merge ~jfguedez/charm-juju-lint:bug/1942945 into charm-juju-lint:master

Proposed by Jose Guedez
Status: Merged
Approved by: James Troup
Approved revision: 62b61dfaa1b7584a1f08b69bd4a653a4c30d9b7f
Merged at revision: d87ae33404e3243047199eee9aa98cacb55ee65d
Proposed branch: ~jfguedez/charm-juju-lint:bug/1942945
Merge into: charm-juju-lint:master
Diff against target: 37 lines (+17/-0)
1 file modified
scripts/auto_lint.py (+17/-0)
Reviewer Review Type Date Requested Status
BootStack Reviewers Pending
BootStack Reviewers Pending
Review via email: mp+408271@code.launchpad.net

Commit message

Adds debug logging to auto_lint.py

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
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision d87ae33404e3243047199eee9aa98cacb55ee65d

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/scripts/auto_lint.py b/scripts/auto_lint.py
index 6446a01..02699f1 100755
--- a/scripts/auto_lint.py
+++ b/scripts/auto_lint.py
@@ -19,8 +19,10 @@ License: Apache License 2.0
19 limitations under the License.19 limitations under the License.
20"""20"""
2121
22import argparse
22from base64 import b64decode23from base64 import b64decode
23import json24import json
25import logging
24from os.path import join26from os.path import join
25import subprocess27import subprocess
26from sys import exit28from sys import exit
@@ -216,6 +218,21 @@ def lint_juju(auto_lint_config):
216218
217def main():219def main():
218 """Call main function."""220 """Call main function."""
221 parser = argparse.ArgumentParser(
222 description="Grab juju status/bundle output and analyse it with Juju Lint."
223 )
224
225 parser.add_argument(
226 "--debug",
227 action="store_true",
228 help="Enable debug logging",
229 )
230
231 args = parser.parse_args()
232
233 loglevel = logging.DEBUG if args.debug else logging.ERROR
234 logging.basicConfig(level=loglevel)
235
219 auto_lint_config = read_json_file(LINT_CONFIG_PATH)236 auto_lint_config = read_json_file(LINT_CONFIG_PATH)
220 verify_auto_lint_config(auto_lint_config)237 verify_auto_lint_config(auto_lint_config)
221 juju_status = loop.run(get_juju_status(auto_lint_config))238 juju_status = loop.run(get_juju_status(auto_lint_config))

Subscribers

People subscribed via source and target branches

to all changes: