From c1ada5cc39ab0019111feef80c4adead10b5ddb5 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Sun, 21 Feb 2010 13:01:06 +0100 Subject: [PATCH] Show error for unknown commands. --- patool | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/patool b/patool index 93395bb..c044114 100755 --- a/patool +++ b/patool @@ -45,5 +45,8 @@ def list (archive, verbose=False): def formats (): return patoolib.list_formats() - -sys.exit(patoolib.baker.run()) +try: + sys.exit(patoolib.baker.run()) +except patoolib.baker.CommandError, msg: + print >>sys.stderr, "patool error:", msg + sys.exit(1)