def fake_extract(self): self.tmpdir = tempfile.mkdtemp(basename(self.name), '_fakeroot') makepaths(self.tmpdir) here = os.getcwd() os.chdir(self.tmpdir) for info in self: ipath = info.name if info.isdir(): if not isdir(ipath): makepaths(ipath) elif info.isreg(): file(ipath, 'w') os.chdir(here)
def fake_extract(self): self.tmpdir = tempfile.mkdtemp(basename(self.name), "_fakeroot") makepaths(self.tmpdir) here = os.getcwd() os.chdir(self.tmpdir) for info in self: ipath = info.name if info.isdir(): if not isdir(ipath): makepaths(ipath) elif info.isreg(): file(ipath, "w") os.chdir(here)
def make_tarball(target, tarball_path, name): makepaths(tarball_path) tarball = open(join(tarball_path, name + '.tar'), 'w:') tarball.add(target, './') tarball.close()
def make_tarball(target, tarball_path, name): makepaths(tarball_path) tarball = open(join(tarball_path, name + ".tar"), "w:") tarball.add(target, "./") tarball.close()