def createOffsetFile()

in fiosynth_lib/fiosynth.py [0:0]


def createOffsetFile(dut, dst_file):
    if dut.inLocalMode():
        try:
            tmp_file = open(dst_file, "w")
            tmp_file.write(str(dut.offset))
        except IOError:
            print("cannot write to %s" % tmp_file)
            sys.exit(1)
        finally:
            tmp_file.close()
        return
    else:
        dutSsh = getSshProc(dut)
        dutSsh.communicate('echo "%s" > %s' % (str(dut.offset), dst_file))
        return