From 78cbd6b1b1c54a6c106620924d35f02862412a18 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Thu, 21 Feb 2013 17:52:36 +0100 Subject: [PATCH] Make sure archive arguments are checked. --- patoolib/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patoolib/__init__.py b/patoolib/__init__.py index 5e7681f..32e95bb 100644 --- a/patoolib/__init__.py +++ b/patoolib/__init__.py @@ -480,7 +480,6 @@ def _handle_archive (archive, command, *args, **kwargs): """Handle archive command; raising PatoolError on errors. @return: output directory if command is 'extract', else None """ - check_archive_arguments(archive, command, *args) format, compression = kwargs.get("format"), kwargs.get("compression") if format is None: format, compression = get_archive_format(archive) @@ -614,11 +613,12 @@ def _repack_archive (archive1, archive2, **kwargs): def handle_archive (archive, command, *args, **kwargs): """Handle archive file command; with nice error reporting.""" + check_archive_arguments(archive, command, *args) try: if command == "diff": - res = _diff_archives(archive, args[0]) + res = _diff_archives(archive, args[0], **kwargs) elif command == "repack": - res = _repack_archive(archive, args[0]) + res = _repack_archive(archive, args[0], **kwargs) else: _handle_archive(archive, command, *args, **kwargs) res = 0