We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f05344d + 54b0cc1 commit f088867Copy full SHA for f088867
sc2reader/scripts/sc2json.py
@@ -34,9 +34,12 @@ def main():
34
args = parser.parse_args()
35
36
factory = sc2reader.factories.SC2Factory()
37
- factory.register_plugin(
38
- "Replay", toJSON(encoding=args.encoding, indent=args.indent)
39
- )
+ try:
+ factory.register_plugin(
+ "Replay", toJSON(encoding=args.encoding, indent=args.indent)
40
+ ) # legacy Python
41
+ except TypeError:
42
+ factory.register_plugin("Replay", toJSON(indent=args.indent))
43
replay_json = factory.load_replay(args.path[0])
44
print(replay_json)
45
0 commit comments