From e4010ded038a871d951c31e16aef9bb83479b4c9 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Mon, 5 Apr 2010 02:47:42 +0200 Subject: [PATCH] Fixed argument order for error message. --- patoolib/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/patoolib/__init__.py b/patoolib/__init__.py index c929bda..ee86c67 100644 --- a/patoolib/__init__.py +++ b/patoolib/__init__.py @@ -324,7 +324,9 @@ def parse_config (archive, format, encoding, command, **kwargs): config[key] = value program = os.path.basename(config['program']) if encoding and not find_encoding_program(program, encoding): - raise util.PatoolError("cannot %s archive `%s': encoding `%s' not supported by %s" % (archive, command, encoding, program)) + msg = "cannot %s archive `%s': encoding `%s' not supported by %s" %\ + (command, archive, encoding, program) + raise util.PatoolError(msg) return config @@ -469,9 +471,10 @@ def handle_archive (archive, command, *args, **kwargs): def rmtree_log_error (func, path, exc): - """Error log function for shutil.rmtree().""" + """Error log function for shutil.rmtree(). Re-raises the exception""" msg = "Error in %s(%s): %s" % (func.__name__, path, str(exc[1])) util.log_error(msg) + raise def _diff_archives (archive1, archive2):