Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove encoding option from JSON script.
Python3 deprecates encoding options in JSON.dumps and defaults to UTF8.
  • Loading branch information
manuelseeger committed Jan 8, 2023
commit 3ab2e86278b03ebce2d7e174776cb3ce14336c68
11 changes: 2 additions & 9 deletions sc2reader/scripts/sc2json.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ def main():
default=None,
help="The per-line indent to use when printing a human readable json string",
)
parser.add_argument(
"--encoding",
"-e",
type=str,
default="UTF-8",
help="The character encoding use..",
)
parser.add_argument(
"path",
metavar="path",
Expand All @@ -34,8 +27,8 @@ def main():
factory = sc2reader.factories.SC2Factory()
try:
factory.register_plugin(
"Replay", toJSON(encoding=args.encoding, indent=args.indent)
) # legacy Python
"Replay", toJSON(indent=args.indent)
)
except TypeError:
factory.register_plugin("Replay", toJSON(indent=args.indent))
replay_json = factory.load_replay(args.path[0])
Expand Down