Skip to content

Commit

Permalink
Specify output_file encoding as utf-8 (PyCQA#364)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Brown <ericwb@users.noreply.github.com>
Co-authored-by: Luke Hinds <7058938+lukehinds@users.noreply.github.com>
  • Loading branch information
3 people authored and mikespallino committed Aug 25, 2021
1 parent 16d0b62 commit 7603e74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bandit/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def main():
)
parser.add_argument(
'-o', '--output', dest='output_file', action='store', nargs='?',
type=argparse.FileType('w'), default=sys.stdout,
type=argparse.FileType('w', encoding='utf-8'), default=sys.stdout,
help='write report to filename'
)
group = parser.add_mutually_exclusive_group(required=False)
Expand Down

0 comments on commit 7603e74

Please sign in to comment.