Permalink
Browse files

Replace seek n' peek with read_range.

  • Loading branch information...
1 parent 84a82ef commit 2f2ac912c09cf16e40cc2a8c75439697bc7ca975 @GraylinKim committed Mar 10, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −2 sc2reader/scripts/sc2parse.py
@@ -67,8 +67,7 @@ def main():
print '[ERROR]', e.message
for event in e.game_events[-5:]:
print '{0} - {1}'.format(hex(event.type),event.bytes.encode('hex'))
- e.buffer.seek(e.location)
- print e.buffer.peek(50).encode('hex')
+ print e.buffer.read_range(e.location, e.location+50).encode('hex')
print
except Exception as e:
print

0 comments on commit 2f2ac91

Please sign in to comment.