Folder.Maildir: Simplify getmessagetime
No need to use os.stat()['st_mtime'] when there is os.path.getmtime() Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
parent
a43677a3e6
commit
dfdc4d457b
@ -202,11 +202,10 @@ class MaildirFolder(BaseFolder):
|
|||||||
# read it as text?
|
# read it as text?
|
||||||
return retval.replace("\r\n", "\n")
|
return retval.replace("\r\n", "\n")
|
||||||
|
|
||||||
def getmessagetime( self, uid ):
|
def getmessagetime(self, uid):
|
||||||
filename = self.messagelist[uid]['filename']
|
filename = self.messagelist[uid]['filename']
|
||||||
filepath = os.path.join(self.getfullname(), filename)
|
filepath = os.path.join(self.getfullname(), filename)
|
||||||
st = os.stat(filepath)
|
return os.path.getmtime(filepath)
|
||||||
return st.st_mtime
|
|
||||||
|
|
||||||
def savemessage(self, uid, content, flags, rtime):
|
def savemessage(self, uid, content, flags, rtime):
|
||||||
# This function only ever saves to tmp/,
|
# This function only ever saves to tmp/,
|
||||||
|
Loading…
Reference in New Issue
Block a user