Пример #1
0
def genDmesg(temppath, name):
    util.makefolder(temppath)
    target = os.path.join(temppath, name)
    print "Generating dmesg output to: %s" % target
    with open(target, "w") as f:
        subprocess.check_call(["dmesg"], stdout=f)
    return target
Пример #2
0
    def genDMAR(self, dmar, outputloc):
        "Copies DMAR file to temp folder, call this first"
        success = False

        outputfolder = os.path.dirname(outputloc)
        # Make temp folder
        util.makefolder(outputfolder)

        # Copy DMAR file to temp folder
        if self._genDMAR_copyDMAR(dmar, outputloc):
            success = True
            self.copiedDMAR = outputloc
        return success