From c855f4d33749dc3ea1478d8a93cb9158a8846b68 Mon Sep 17 00:00:00 2001 From: Michel Oosterhof Date: Sat, 31 Jan 2015 08:56:32 +0000 Subject: [PATCH] catch right exception for non-existent file in rm command --- kippo/commands/fs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kippo/commands/fs.py b/kippo/commands/fs.py index fcdd675..0cec4b7 100644 --- a/kippo/commands/fs.py +++ b/kippo/commands/fs.py @@ -56,7 +56,7 @@ class command_rm(HoneyPotCommand): path = self.fs.resolve_path(f, self.honeypot.cwd) try: dir = self.fs.get_path('/'.join(path.split('/')[:-1])) - except IndexError: + except IndexError, FileNotFound: self.writeln( 'rm: cannot remove `%s\': No such file or directory' % f) continue