about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-05-17 23:01:23 +0200
committerhut <hut@lavabit.com>2010-05-17 23:01:23 +0200
commitc1a50251bb483933f773f035f1684791a5697452 (patch)
tree6c2b62ba48648df16cb618cadc35c9364935a67b
parentdee6cfa6f24ad3e8bf83df6dc594038193d069bf (diff)
downloadranger-c1a50251bb483933f773f035f1684791a5697452.tar.gz
fsobject.fsobject: shortened some code
-rw-r--r--ranger/fsobject/fsobject.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/ranger/fsobject/fsobject.py b/ranger/fsobject/fsobject.py
index 963d4472..92ce0d70 100644
--- a/ranger/fsobject/fsobject.py
+++ b/ranger/fsobject/fsobject.py
@@ -274,11 +274,7 @@ class FileSystemObject(MimeTypeAware, FileManagerAware):
 			real_mtime = lstat(self.path).st_mtime
 		except OSError:
 			real_mtime = None
-		if self.stat:
-			cached_mtime = self.stat.st_mtime
-		else:
-			cached_mtime = 0
-		if real_mtime != cached_mtime:
+		if not self.stat or self.stat.st_mtime != real_mtime:
 			self.load()
 			return True
 		return False