From 077275eb32637b3f60d92a5375a0278d51a00bf6 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Sun, 21 Feb 2010 16:04:09 +0100 Subject: [PATCH] Fix formats command --- patoolib/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/patoolib/__init__.py b/patoolib/__init__.py index 3b4c772..d1ec273 100644 --- a/patoolib/__init__.py +++ b/patoolib/__init__.py @@ -177,11 +177,11 @@ def list_formats (): for format in ArchiveFormats: print format, "files:" for command in ArchiveCommands: - program = find_archive_program(format, command) - if program: + try: + program = find_archive_program(format, command) print " %8s: %s" % (command, program) - else: - print " %8s: NOT SUPPORTED" + except util.PatoolError: + print " %8s: - (not supported)" % command return 0