Merge branch 'master' of https://github.com/AndyGrant/OpenBench
This commit is contained in:
commit
2894a2ecbe
1 file changed
+14
-1
+14
-1
@@ -258,11 +258,24 @@ def getEngine(data, engine, network):
|
||||
shutil.rmtree('tmp')
|
||||
|
||||
def getNetworkWeights(server, network):
|
||||
if not network: return
|
||||
|
||||
if not network:
|
||||
return
|
||||
|
||||
print ('Fetching and Verifying Network ({0})'.format(network))
|
||||
fname = pathjoin('Networks', network).rstrip('/')
|
||||
if not os.path.isfile(fname):
|
||||
getFile('{}/networks/download/{}'.format(server, network), fname)
|
||||
|
||||
with open(fname, 'rb') as weights:
|
||||
sha256 = hashlib.sha256(weights.read()).hexdigest()[:8].upper()
|
||||
|
||||
if sha256 != network:
|
||||
os.remove(fname)
|
||||
raise Exception('Unable to verify Network Weights')
|
||||
|
||||
print ('')
|
||||
|
||||
def getCutechessCommand(arguments, data, nps):
|
||||
|
||||
# Parse options for Dev
|
||||
|
||||
Reference in new issue
Block a user