def test_patch_for_similarities(params, extension):
file_out_suff = params.get('data', 'file_out_suff')
template_file = file_out_suff + '.templates%s.hdf5' %extension
if os.path.exists(template_file):
try:
myfile = h5py.File(template_file, 'r', libver='latest')
version = myfile.get('version')[0].decode('ascii')
myfile.close()
except Exception:
version = None
else:
raise Exception('No templates found! Check suffix?')
if version is not None:
if (StrictVersion(version) >= StrictVersion('0.6.0')):
return True
else:
print_and_log(["Version is below 0.6.0"], 'debug', logger)
return False
评论列表
文章目录