Commit dbbf76bd authored by Fred Drake's avatar Fred Drake

Make tabnanny happy.

mailbox.py: Convert to 4-space indents.
parent c2844af8
...@@ -7,7 +7,6 @@ import rfc822 ...@@ -7,7 +7,6 @@ import rfc822
import os import os
class _Mailbox: class _Mailbox:
def __init__(self, fp): def __init__(self, fp):
self.fp = fp self.fp = fp
self.seekp = 0 self.seekp = 0
...@@ -35,8 +34,8 @@ class _Mailbox: ...@@ -35,8 +34,8 @@ class _Mailbox:
break break
return rfc822.Message(_Subfile(self.fp, start, stop)) return rfc822.Message(_Subfile(self.fp, start, stop))
class _Subfile:
class _Subfile:
def __init__(self, fp, start, stop): def __init__(self, fp, start, stop):
self.fp = fp self.fp = fp
self.start = start self.start = start
...@@ -93,8 +92,8 @@ class _Subfile: ...@@ -93,8 +92,8 @@ class _Subfile:
def close(self): def close(self):
del self.fp del self.fp
class UnixMailbox(_Mailbox):
class UnixMailbox(_Mailbox):
def _search_start(self): def _search_start(self):
while 1: while 1:
pos = self.fp.tell() pos = self.fp.tell()
...@@ -132,8 +131,8 @@ class UnixMailbox(_Mailbox): ...@@ -132,8 +131,8 @@ class UnixMailbox(_Mailbox):
self._regexp = re.compile(self._fromlinepattern) self._regexp = re.compile(self._fromlinepattern)
return self._regexp.match(line) return self._regexp.match(line)
class MmdfMailbox(_Mailbox):
class MmdfMailbox(_Mailbox):
def _search_start(self): def _search_start(self):
while 1: while 1:
line = self.fp.readline() line = self.fp.readline()
...@@ -152,8 +151,8 @@ class MmdfMailbox(_Mailbox): ...@@ -152,8 +151,8 @@ class MmdfMailbox(_Mailbox):
self.fp.seek(pos) self.fp.seek(pos)
return return
class MHMailbox:
class MHMailbox:
def __init__(self, dirname): def __init__(self, dirname):
import re import re
pat = re.compile('^[0-9][0-9]*$') pat = re.compile('^[0-9][0-9]*$')
...@@ -172,8 +171,8 @@ class MHMailbox: ...@@ -172,8 +171,8 @@ class MHMailbox:
fp = open(os.path.join(self.dirname, fn)) fp = open(os.path.join(self.dirname, fn))
return rfc822.Message(fp) return rfc822.Message(fp)
class Maildir:
class Maildir:
# Qmail directory mailbox # Qmail directory mailbox
def __init__(self, dirname): def __init__(self, dirname):
...@@ -201,8 +200,8 @@ class Maildir: ...@@ -201,8 +200,8 @@ class Maildir:
fp = open(os.path.join(self.dirname, fn)) fp = open(os.path.join(self.dirname, fn))
return rfc822.Message(fp) return rfc822.Message(fp)
class BabylMailbox(_Mailbox):
class BabylMailbox(_Mailbox):
def _search_start(self): def _search_start(self):
while 1: while 1:
line = self.fp.readline() line = self.fp.readline()
......
...@@ -17,7 +17,8 @@ class shlex: ...@@ -17,7 +17,8 @@ class shlex:
self.instream = sys.stdin self.instream = sys.stdin
self.infile = None self.infile = None
self.commenters = '#' self.commenters = '#'
self.wordchars = 'abcdfeghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_' self.wordchars = ('abcdfeghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_')
self.whitespace = ' \t\r\n' self.whitespace = ' \t\r\n'
self.quotes = '\'"' self.quotes = '\'"'
self.state = ' ' self.state = ' '
...@@ -88,7 +89,7 @@ class shlex: ...@@ -88,7 +89,7 @@ class shlex:
if self.debug >= 3: if self.debug >= 3:
print "shlex: in state", repr(self.state), \ print "shlex: in state", repr(self.state), \
"I see character:", repr(nextchar) "I see character:", repr(nextchar)
if self.state == None: if self.state is None:
self.token = ''; # past end of file self.token = ''; # past end of file
break break
elif self.state == ' ': elif self.state == ' ':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment