Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoding intput files as utf8 after reading #195

Merged
merged 1 commit into from
Oct 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions stone/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def main():
sys.exit(1)
else:
with open(spec_path) as f:
specs.append((spec_path, f.read()))
specs.append((spec_path, f.read().decode('utf8')))
if read_from_stdin and specs:
print("error: Do not specify stdin and specification files "
"simultaneously.", file=sys.stderr)
Expand Down Expand Up @@ -241,7 +241,7 @@ def main():

if args.route_whitelist_filter:
with open(args.route_whitelist_filter) as f:
route_whitelist_filter = json.loads(f.read())
route_whitelist_filter = json.loads(f.read().decode('utf8'))
else:
route_whitelist_filter = None

Expand Down