summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/fsobject/fsobject.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ranger/fsobject/fsobject.py b/ranger/fsobject/fsobject.py
index 63ff85ce..e9c44653 100644
--- a/ranger/fsobject/fsobject.py
+++ b/ranger/fsobject/fsobject.py
@@ -260,13 +260,13 @@ class FileSystemObject(MimeTypeAware, FileManagerAware):
 
 		mode = self.stat.st_mode
 		test = 0o0400
-		for who in range(3):
+		while test:
 			for what in "rwx":
 				if mode & test:
 					perms.append(what)
 				else:
 					perms.append('-')
-				test >> 1
+				test >>= 1
 
 		self.permissions = ''.join(perms)
 		return self.permissions