def Handle_SquashFS(self, Key):
Path = os.path.join(self.DestDir, Key)
DestDir = Path.rstrip(".raw") + ".extracted"
Binary = "unsquashfs"
if self.CheckDependency(Binary):
return 1
# Need root to preserve permissions.
if self.Debug:
self.Logger.debug(' '.join(["sudo", Binary, "-d", DestDir, Path]))
Result = subprocess.call(["sudo", Binary, "-d", DestDir, Path])
else:
Result = subprocess.call(["sudo", Binary, "-d", DestDir, Path], stdout=subprocess.DEVNULL)
return Result
评论列表
文章目录