summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-07-05 20:47:54 +0200
committerhut <hut@lavabit.com>2012-07-05 22:12:01 +0200
commite5978d9ed9ffb3382e23a56c9f8f03544109b2aa (patch)
tree8dc6a020adeb7488bd97f4c9a85521a7b446e75e /ranger
parent9b55e4f44e7c3fcbba8391ffe32148bbc8432363 (diff)
downloadranger-e5978d9ed9ffb3382e23a56c9f8f03544109b2aa.tar.gz
ext.rifle: fixed imports when using rifle standalone
Diffstat (limited to 'ranger')
-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)