Skip to content

Commit

Permalink
Allow shrinker to read traces from stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
mn416 committed Feb 17, 2016
1 parent d70a473 commit 66853a9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/axe-shrink.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@
sys.exit()

# Open trace
f = open(sys.argv[2], 'r')
if f == None:
print "File not found: ", sys.argv[2]
sys.exit()
if sys.argv[2] == "-":
f = sys.stdin
else:
f = open(sys.argv[2], 'r')
if f == None:
print "File not found: ", sys.argv[2]
sys.exit()

# Read trace
lines = []
Expand Down

0 comments on commit 66853a9

Please sign in to comment.