summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-17 16:31:50 +0100
committerhut <hut@lavabit.com>2010-03-17 16:31:50 +0100
commite74ac575232f8b67d9a8111add1b5010943af9c9 (patch)
tree2ac4ec8ea4d77119982afb4b862d29d739a7196d /ranger
parent3a12d7d31e5b49926f4a79066db7e9b03810ff1c (diff)
downloadranger-e74ac575232f8b67d9a8111add1b5010943af9c9.tar.gz
fsobject: slight performance improvement.
One less unneccessary call to string.upper()
Diffstat (limited to 'ranger')
-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