summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/fsobject/fsobject.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ranger/fsobject/fsobject.py b/ranger/fsobject/fsobject.py
index 92c8b596..4278c3e8 100644
--- a/ranger/fsobject/fsobject.py
+++ b/ranger/fsobject/fsobject.py
@@ -218,12 +218,12 @@ class FileSystemObject(MimeTypeAware, FileManagerAware):
 		else:
 			perms = ['-']
 
-		for who in "USR", "GRP", "OTH":
-			for what in "rwx":
-				if mode & getattr(stat, "S_I" + what.upper() + who):
-					perms.append( what.lower() )
+		for who in ("USR", "GRP", "OTH"):
+			for what in "RWX":
+				if mode & getattr(stat, "S_I" + what + who):
+					perms.append(what.lower())
 				else:
-					perms.append( '-' )
+					perms.append('-')
 
 		self.permissions = ''.join(perms)
 		return self.permissions