Skip to content

Commit 94393d5

Browse files
committed
Small fixes to the Map constructing.
1 parent 370eebb commit 94393d5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sc2reader/resources.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,8 @@ def __init__(self, replay_file, filename=None, load_level=4, **options):
165165
# Can only be effective if map data has been loaded
166166
if options.get('load_map', False):
167167
map_url = Map.get_url(self.gateway, self.map_hash)
168-
print map_url
169168
map_file = StringIO(urllib2.urlopen(map_url).read())
170-
replay.map = Map(map_file, filename=self.map, gateway=self.gateway, map_hash=self.map_hash)
169+
self.map = Map(map_file, filename=self.map, gateway=self.gateway, map_hash=self.map_hash)
171170

172171

173172
# Load players if requested
@@ -466,7 +465,7 @@ def __init__(self, map_file, filename=None, gateway=None, map_hash=None, **optio
466465
self.hash = map_hash
467466
self.gateway = gateway
468467
self.url = Map.get_url(gateway, map_hash)
469-
self.archive = MPQArchive(StringIO(map_file))
468+
self.archive = MPQArchive(map_file)
470469
self.minimap = self.archive.read_file('Minimap.tga')
471470

472471
@classmethod

0 commit comments

Comments
 (0)