Skip to content

Commit 533a67f

Browse files
committed
Adds option to ignore game.event parsing issues for non-ladder games.
1 parent b1db931 commit 533a67f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sc2reader/scripts/sc2parse.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
def main():
2828
parser = argparse.ArgumentParser(description="Recursively parses replay files, inteded for debugging parse issues.")
2929
parser.add_argument('--one_each', help="Attempt to parse only one Ladder replay for each release_string", action="store_true")
30+
parser.add_argument('--ladder_only', help="If a non-ladder game fails, ignore it", action="store_true")
3031
parser.add_argument('folders', metavar='folder', type=str, nargs='+', help="Path to a folder")
3132
args = parser.parse_args()
3233

@@ -43,6 +44,8 @@ def main():
4344
if not args.one_each or replay.is_ladder:
4445
replay = sc2reader.load_replay(path, debug=True)
4546
except sc2reader.exceptions.ReadError as e:
47+
if args.ladder_only and not e.replay.is_ladder: continue
48+
4649
print
4750
print path
4851
print '{build} - {real_type} on {map_name} - Played {start_time}'.format(**e.replay.__dict__)

0 commit comments

Comments
 (0)