From fdb15f569bb0e843142804e56475c0e26ecf9e1a Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Thu, 14 Dec 2017 20:50:14 +0100 Subject: [PATCH] handle disappearing files --- catcli/noder.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/catcli/noder.py b/catcli/noder.py index 5d7f4f0..ab557cc 100644 --- a/catcli/noder.py +++ b/catcli/noder.py @@ -51,6 +51,9 @@ class Noder: def file_node(self, name, path, parent, storagepath): ''' create a new node representing a file ''' + if not os.path.exists(path): + Logger.err('File \"{}\" does not exist'.format(path)) + return None path = os.path.abspath(path) st = os.lstat(path) md5 = None