Show error for unknown commands.

This commit is contained in:
Bastian Kleineidam 2010-02-21 13:01:06 +01:00
parent ed244c1338
commit c1ada5cc39
1 changed files with 5 additions and 2 deletions

7
patool
View File

@ -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)