summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-23 02:21:06 +0100
committerhut <hut@lavabit.com>2009-12-23 02:21:06 +0100
commitc2a890822a9d38b86695c79b4bc7c25bd0a80c7e (patch)
tree085803b63938387fe9178bf43e12083c5fca7ea9
parent5645f266e4fa120d28d1fabb320483dd2ea6b892 (diff)
downloadranger-c2a890822a9d38b86695c79b4bc7c25bd0a80c7e.tar.gz
handled exception found in the unit tests
-rw-r--r--ranger/fsobject/fsobject.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ranger/fsobject/fsobject.py b/ranger/fsobject/fsobject.py
index c0ab6a9c..7899e5f5 100644
--- a/ranger/fsobject/fsobject.py
+++ b/ranger/fsobject/fsobject.py
@@ -194,7 +194,10 @@ class FileSystemObject(MimeTypeAware, FileManagerAware):
 		if self.load_once(): return True
 
 		import os
-		real_mtime = os.stat(self.path).st_mtime
+		try:
+			real_mtime = os.stat(self.path).st_mtime
+		except OSError:
+			return False
 		cached_mtime = self.stat.st_mtime
 
 		if real_mtime != cached_mtime: