Skip to content

Commit 3ab2e86

Browse files
committed
Remove encoding option from JSON script.
Python3 deprecates encoding options in JSON.dumps and defaults to UTF8.
1 parent 7da58b1 commit 3ab2e86

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

sc2reader/scripts/sc2json.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ def main():
1515
default=None,
1616
help="The per-line indent to use when printing a human readable json string",
1717
)
18-
parser.add_argument(
19-
"--encoding",
20-
"-e",
21-
type=str,
22-
default="UTF-8",
23-
help="The character encoding use..",
24-
)
2518
parser.add_argument(
2619
"path",
2720
metavar="path",
@@ -34,8 +27,8 @@ def main():
3427
factory = sc2reader.factories.SC2Factory()
3528
try:
3629
factory.register_plugin(
37-
"Replay", toJSON(encoding=args.encoding, indent=args.indent)
38-
) # legacy Python
30+
"Replay", toJSON(indent=args.indent)
31+
)
3932
except TypeError:
4033
factory.register_plugin("Replay", toJSON(indent=args.indent))
4134
replay_json = factory.load_replay(args.path[0])

0 commit comments

Comments
 (0)