Allow 7z again
This commit is contained in:
parent
54b0630891
commit
87248503b4
@ -289,17 +289,13 @@ class RarArchiver(Archiver):
|
||||
orig = rarfile.UNRAR_TOOL
|
||||
rarfile.UNRAR_TOOL = cls.exe
|
||||
try:
|
||||
return rarfile.is_rarfile(str(path)) and rarfile.tool_setup(
|
||||
sevenzip=platform.system() == "Windows", sevenzip2=platform.system() == "Windows", force=True
|
||||
)
|
||||
return rarfile.is_rarfile(str(path)) and rarfile.tool_setup(sevenzip=False, sevenzip2=False, force=True)
|
||||
except rarfile.RarCannotExec:
|
||||
rarfile.UNRAR_TOOL = orig
|
||||
|
||||
# Fallback to standard
|
||||
try:
|
||||
return rarfile.is_rarfile(str(path)) and rarfile.tool_setup(
|
||||
sevenzip=platform.system() == "Windows", sevenzip2=platform.system() == "Windows", force=True
|
||||
)
|
||||
return rarfile.is_rarfile(str(path)) and rarfile.tool_setup(force=True)
|
||||
except rarfile.RarCannotExec as e:
|
||||
logger.info(e)
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user