summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-05-14 18:43:28 +0200
committerhut <hut@lavabit.com>2010-05-14 18:43:28 +0200
commit298c72a273d440c0cd0b3a3611ddee0584e17df2 (patch)
tree7e0b6120fa757848a12897148ae580d8dab322cc /ranger
parent863f85ce9000eaef047631db0e42cdbfbb7c776e (diff)
downloadranger-298c72a273d440c0cd0b3a3611ddee0584e17df2.tar.gz
fsobject.fsobject: corrected typo and optimized loop
Diffstat (limited to 'ranger')
-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