Make tabnanny happy.
mailbox.py: Convert to 4-space indents.
This commit is contained in:
parent
c2844af87b
commit
dbbf76bd5a
|
@ -7,7 +7,6 @@ import rfc822
|
|||
import os
|
||||
|
||||
class _Mailbox:
|
||||
|
||||
def __init__(self, fp):
|
||||
self.fp = fp
|
||||
self.seekp = 0
|
||||
|
@ -35,8 +34,8 @@ class _Mailbox:
|
|||
break
|
||||
return rfc822.Message(_Subfile(self.fp, start, stop))
|
||||
|
||||
class _Subfile:
|
||||
|
||||
class _Subfile:
|
||||
def __init__(self, fp, start, stop):
|
||||
self.fp = fp
|
||||
self.start = start
|
||||
|
@ -93,8 +92,8 @@ class _Subfile:
|
|||
def close(self):
|
||||
del self.fp
|
||||
|
||||
class UnixMailbox(_Mailbox):
|
||||
|
||||
class UnixMailbox(_Mailbox):
|
||||
def _search_start(self):
|
||||
while 1:
|
||||
pos = self.fp.tell()
|
||||
|
@ -132,8 +131,8 @@ class UnixMailbox(_Mailbox):
|
|||
self._regexp = re.compile(self._fromlinepattern)
|
||||
return self._regexp.match(line)
|
||||
|
||||
class MmdfMailbox(_Mailbox):
|
||||
|
||||
class MmdfMailbox(_Mailbox):
|
||||
def _search_start(self):
|
||||
while 1:
|
||||
line = self.fp.readline()
|
||||
|
@ -152,8 +151,8 @@ class MmdfMailbox(_Mailbox):
|
|||
self.fp.seek(pos)
|
||||
return
|
||||
|
||||
class MHMailbox:
|
||||
|
||||
class MHMailbox:
|
||||
def __init__(self, dirname):
|
||||
import re
|
||||
pat = re.compile('^[0-9][0-9]*$')
|
||||
|
@ -172,8 +171,8 @@ class MHMailbox:
|
|||
fp = open(os.path.join(self.dirname, fn))
|
||||
return rfc822.Message(fp)
|
||||
|
||||
class Maildir:
|
||||
|
||||
class Maildir:
|
||||
# Qmail directory mailbox
|
||||
|
||||
def __init__(self, dirname):
|
||||
|
@ -201,8 +200,8 @@ class Maildir:
|
|||
fp = open(os.path.join(self.dirname, fn))
|
||||
return rfc822.Message(fp)
|
||||
|
||||
class BabylMailbox(_Mailbox):
|
||||
|
||||
class BabylMailbox(_Mailbox):
|
||||
def _search_start(self):
|
||||
while 1:
|
||||
line = self.fp.readline()
|
||||
|
|
|
@ -17,7 +17,8 @@ class shlex:
|
|||
self.instream = sys.stdin
|
||||
self.infile = None
|
||||
self.commenters = '#'
|
||||
self.wordchars = 'abcdfeghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'
|
||||
self.wordchars = ('abcdfeghijklmnopqrstuvwxyz'
|
||||
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_')
|
||||
self.whitespace = ' \t\r\n'
|
||||
self.quotes = '\'"'
|
||||
self.state = ' '
|
||||
|
@ -88,7 +89,7 @@ class shlex:
|
|||
if self.debug >= 3:
|
||||
print "shlex: in state", repr(self.state), \
|
||||
"I see character:", repr(nextchar)
|
||||
if self.state == None:
|
||||
if self.state is None:
|
||||
self.token = ''; # past end of file
|
||||
break
|
||||
elif self.state == ' ':
|
||||
|
|
Loading…
Reference in New Issue