catch right exception for non-existent file in rm command

This commit is contained in:
Michel Oosterhof
2015-01-31 08:56:32 +00:00
parent 44a411d3cd
commit c855f4d337

View File

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