diff --git a/coco/sftp.py b/coco/sftp.py index b835a25c5cef5be3918e4613b1457a9ea58fe493..629b3fe905e1517448a1fb6fd191ddda2d4bc73c 100644 --- a/coco/sftp.py +++ b/coco/sftp.py @@ -160,7 +160,11 @@ class SFTPServer(paramiko.SFTPServerInterface): return attr else: sftp = self.get_host_sftp(host, su) - return sftp.stat(rpath) + try: + stat = sftp.stat(rpath) + return stat + except FileNotFoundError as e: + return paramiko.SFTPServer.convert_errno(e.errno) def lstat(self, path): host, su, rpath = self.parse_path(path) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index ce1eb73f8f2a599904a55a10c4a0b1430e7d0b9e..dc6f7288c89a71ad1f2bdbd4a98675f59a386b16 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -8,7 +8,7 @@ cffi==1.11.2 chardet==3.0.4 click==6.7 crcmod==1.7 -cryptography==2.1.4 +cryptography==2.3.1 docutils==0.14 dotmap==1.2.20 elasticsearch==6.1.1 @@ -40,5 +40,5 @@ six==1.11.0 tornado==4.5.2 urllib3==1.22 wcwidth==0.1.7 -eventlet==0.22.1 +eventlet==0.24.1 Werkzeug==0.14.1