def image(self, img_type, outf): if not config.core.dot: common_err("dot not found") return False dotf = self.totmpf() if not dotf: return False tmpfiles.add(dotf) return (utils.ext_cmd_nosudo("%s -T%s -o%s %s" % (config.core.dot, img_type, outf, dotf)) == 0)
def image(self, img_type, outf): if not config.core.dot: common_err("dot not found") return False dotf = self.totmpf() if not dotf: return False tmpfiles.add(dotf) return (utils.ext_cmd_nosudo( "%s -T%s -o%s %s" % (config.core.dot, img_type, outf, dotf)) == 0)
def _load_cib(self, source): if source == "live": if not self.backing_file: self.backing_file = xmlutil.cibdump2tmp() if not self.backing_file: return None tmpfiles.add(self.backing_file) else: xmlutil.cibdump2file(self.backing_file) f = self.backing_file else: f = cib_path(source) return xmlutil.read_cib(xmlutil.file2cib_elem, f)