Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, replayFile):
# The replayFile can be either the name of a file or any object that has a 'read()' method.
self.mpq = mpyq.MPQArchive(replayFile)
self.buildStormReplay = protocol15405.decode_replay_header(self.mpq.header['user_data_header']['content'])['m_version']['m_baseBuild']
try:
self.protocol = __import__('s2protocol' + '.protocol%s' % self.buildStormReplay, fromlist=['protocol2'])
except ImportError:
raise Exception('Unsupported build number: %i' % self.buildStormReplay)
def __init__(self, replayFile):
# The replayFile can be either the name of a file or any object that has a 'read()' method.
self.mpq = mpyq.MPQArchive(replayFile)
self.buildStormReplay = protocol15405.decode_replay_header(self.mpq.header['user_data_header']['content'])['m_version']['m_baseBuild']
try:
self.protocol = __import__('s2protocol' + '.protocol%s' % self.buildStormReplay, fromlist=['protocol2'])
except ImportError:
raise Exception('Unsupported build number: %i' % self.buildStormReplay)
def __init__(self, replayFile):
# The replayFile can be either the name of a file or any object that has a 'read()' method.
self.mpq = mpyq.MPQArchive(replayFile)
self.buildStormReplay = protocol15405.decode_replay_header(self.mpq.header['user_data_header']['content'])['m_version']['m_baseBuild']
try:
self.protocol = __import__('s2protocol' + '.protocol%s' % self.buildStormReplay, fromlist=['protocol2'])
except ImportError:
raise Exception('Unsupported build number: %i' % self.buildStormReplay)