Skip to content

Commit 09a00cc

Browse files
committed
Remove encoding option from JSON script.
Python3 deprecates encoding option on json.dumps and defaults to UTF8.
1 parent 7da58b1 commit 09a00cc

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

sc2reader/scripts/sc2json.py

Lines changed: 1 addition & 10 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",
@@ -33,9 +26,7 @@ def main():
3326

3427
factory = sc2reader.factories.SC2Factory()
3528
try:
36-
factory.register_plugin(
37-
"Replay", toJSON(encoding=args.encoding, indent=args.indent)
38-
) # legacy Python
29+
factory.register_plugin("Replay", toJSON(indent=args.indent))
3930
except TypeError:
4031
factory.register_plugin("Replay", toJSON(indent=args.indent))
4132
replay_json = factory.load_replay(args.path[0])

0 commit comments

Comments
 (0)