diff --git a/CHANGES.md b/CHANGES.md index 427c8f29..6707ed9f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ * Add Filelock 3.9.0 (ce3e891) * Remove Lockfile no longer used by Cachecontrol * Update Msgpack 1.0.0 (fa7d744) to 1.0.4 (b5acfd5) +* Update Rarfile 4.0 (55fe778) to 4.1a1 (8a72967) * Update Send2Trash 1.5.0 (66afce7) to 1.8.1b0 (0ef9b32) * Update SimpleJSON 3.16.1 (ce75e60) to 3.18.1 (c891b95) * Update tmdbsimple 2.6.6 (679e343) to 2.9.1 (9da400a) diff --git a/lib/rarfile/rarfile.py b/lib/rarfile/rarfile.py index 13166ca4..ba6611cb 100644 --- a/lib/rarfile/rarfile.py +++ b/lib/rarfile/rarfile.py @@ -65,6 +65,8 @@ from struct import Struct, pack, unpack from subprocess import DEVNULL, PIPE, STDOUT, Popen from tempfile import mkstemp +AES = None + # only needed for encrypted headers try: try: @@ -3119,7 +3121,7 @@ class nsdatetime(datetime): __slots__ = ("nanosecond",) nanosecond: int #: Number of nanoseconds, 0 <= nanosecond < 999999999 - def __new__(cls, year, month, day, hour=0, minute=0, second=0, + def __new__(cls, year, month=None, day=None, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0, nanosecond=0): usec, mod = divmod(nanosecond, 1000) if nanosecond else (microsecond, 0) if mod == 0: @@ -3303,7 +3305,10 @@ class ToolSetup: if not isinstance(pwd, str): pwd = pwd.decode("utf8") args = self.setup["password"] - if isinstance(args, str): + if args is None: + tool = self.setup["open_cmd"][0] + raise RarCannotExec(f"{tool} does not support passwords") + elif isinstance(args, str): cmdline.append(args + pwd) else: cmdline.extend(args)