From c1a50251bb483933f773f035f1684791a5697452 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 17 May 2010 23:01:23 +0200 Subject: fsobject.fsobject: shortened some code --- ranger/fsobject/fsobject.py | 6 +----- 1 file changed, 1 insertion(+), 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 -- cgit 1.4.1-2-gfad0