Merge ~kotodama/container-log-archive-charm:anonymize_web_log-fix-python3 into container-log-archive-charm:master

Proposed by Loïc Gomez
Status: Merged
Approved by: Tom Haddon
Approved revision: 22f004954cb07b9c5680a56d7db997ec40754b94
Merged at revision: 5c1b051f1f1407b0bc02a27b11e5ab008795bdef
Proposed branch: ~kotodama/container-log-archive-charm:anonymize_web_log-fix-python3
Merge into: container-log-archive-charm:master
Diff against target: 15 lines (+2/-2)
1 file modified
files/anonymize_web_log.py (+2/-2)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Canonical IS Reviewers Pending
Review via email: mp+409509@code.launchpad.net

Commit message

Fix anonymize_web_log.py main() for python3

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
Tom Haddon (mthaddon) wrote :

LGTM

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

Change successfully merged at revision 5c1b051f1f1407b0bc02a27b11e5ab008795bdef

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/files/anonymize_web_log.py b/files/anonymize_web_log.py
2index d880115..1862847 100755
3--- a/files/anonymize_web_log.py
4+++ b/files/anonymize_web_log.py
5@@ -91,8 +91,8 @@ def main():
6 anonymized_path = args.output
7
8 # Process the lines of the file
9- with open(anonymized_path, 'w') as new_file:
10- with open(args.log_path, 'r') as log_file:
11+ with open(anonymized_path, 'wb') as new_file:
12+ with open(args.log_path, 'rb') as log_file:
13 anonymize_args = (
14 new_file,
15 log_file,

Subscribers

People subscribed via source and target branches