From dfdc4d457be0f411c0e2d0ddc12a6169959f26df Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Tue, 30 Aug 2011 12:36:55 +0200 Subject: [PATCH] Folder.Maildir: Simplify getmessagetime No need to use os.stat()['st_mtime'] when there is os.path.getmtime() Signed-off-by: Sebastian Spaeth --- offlineimap/folder/Maildir.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/offlineimap/folder/Maildir.py b/offlineimap/folder/Maildir.py index f26b07e..cd3da7d 100644 --- a/offlineimap/folder/Maildir.py +++ b/offlineimap/folder/Maildir.py @@ -202,11 +202,10 @@ class MaildirFolder(BaseFolder): # read it as text? return retval.replace("\r\n", "\n") - def getmessagetime( self, uid ): + def getmessagetime(self, uid): filename = self.messagelist[uid]['filename'] filepath = os.path.join(self.getfullname(), filename) - st = os.stat(filepath) - return st.st_mtime + return os.path.getmtime(filepath) def savemessage(self, uid, content, flags, rtime): # This function only ever saves to tmp/,