summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xranger/ext/rifle.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ranger/ext/rifle.py b/ranger/ext/rifle.py
index e27c8da3..b9cdf712 100755
--- a/ranger/ext/rifle.py
+++ b/ranger/ext/rifle.py
@@ -50,14 +50,14 @@ except ImportError:
 				continue
 			paths_seen.add(path)
 			try:
-				content = listdir(path)
-			except:
+				content = os.listdir(path)
+			except OSError:
 				continue
 			for item in content:
 				abspath = path + '/' + item
 				try:
-					filestat = stat(abspath)
-				except:
+					filestat = os.stat(abspath)
+				except OSError:
 					continue
 				if filestat.st_mode & (S_IXOTH | S_IFREG):
 					_cached_executables.add(item)