in fiosynth_lib/fiosynth.py [0:0]
def readOffsetFile(dut, dst_file):
if checkFileExist(dst_file, dut):
tmp_file = open(dst_file, "r")
try:
dut.offset = int(tmp_file.readline().strip())
except IOError:
print("cannot read from %s" % tmp_file)
sys.exit(1)
tmp_file.close()
else:
if dut.inLocalMode():
print("offset file (%s) does not exist" % dst_file)
else:
print(
"offset file (%s) does not exist on server %s"
% (dst_file, dut.server_name)
)
print("Device has not been preconditioned yet")
sys.exit(1)