parent
0684488a25
commit
d6e51fa204
|
@ -1,4 +1,4 @@
|
|||
import commands, dirutil, grp, mailbox, method, mode, os.path, pwd, re
|
||||
import commands, dirutil, grp, mailbox, method, mode, os.path, pwd, re, sys
|
||||
import buffer, default, window
|
||||
from mode.mutt import MuttGrammar
|
||||
from lex import Grammar, PatternRule, RegionRule, PatternGroupRule
|
||||
|
@ -134,7 +134,11 @@ class MboxListBuffer(Buffer):
|
|||
f = open(self.path, 'r')
|
||||
self.size = len(f.read())
|
||||
f.close()
|
||||
self.mbox = mailbox.mbox(self.path)
|
||||
if sys.version_info == 4:
|
||||
fp = open(self.path, 'rb')
|
||||
self.mbox = mailbox.UnixMailbox(fp)
|
||||
else:
|
||||
self.mbox = mailbox.mbox(self.path)
|
||||
lines = []
|
||||
pos = 1
|
||||
msgs = list(self.mbox)
|
||||
|
|
Loading…
Reference in New Issue