mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-01-02 13:54:20 +01:00
catch right exception for non-existent file in rm command
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user