Reformat offlineimap/repository/__init__.py
Add some spaces, remove lines,... now format is better (lintian).
This commit is contained in:
parent
3a1b25c204
commit
b64430e035
@ -19,7 +19,7 @@ from sys import exc_info
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
from configparser import NoSectionError
|
from configparser import NoSectionError
|
||||||
except ImportError: #python2
|
except ImportError: # python2
|
||||||
from configparser import NoSectionError
|
from configparser import NoSectionError
|
||||||
|
|
||||||
from offlineimap.repository.IMAP import IMAPRepository, MappedIMAPRepository
|
from offlineimap.repository.IMAP import IMAPRepository, MappedIMAPRepository
|
||||||
@ -44,13 +44,13 @@ class Repository(object):
|
|||||||
name = account.getconf('remoterepository')
|
name = account.getconf('remoterepository')
|
||||||
# We don't support Maildirs on the remote side.
|
# We don't support Maildirs on the remote side.
|
||||||
typemap = {'IMAP': IMAPRepository,
|
typemap = {'IMAP': IMAPRepository,
|
||||||
'Gmail': GmailRepository}
|
'Gmail': GmailRepository}
|
||||||
|
|
||||||
elif reqtype == 'local':
|
elif reqtype == 'local':
|
||||||
name = account.getconf('localrepository')
|
name = account.getconf('localrepository')
|
||||||
typemap = {'IMAP': MappedIMAPRepository,
|
typemap = {'IMAP': MappedIMAPRepository,
|
||||||
'Maildir': MaildirRepository,
|
'Maildir': MaildirRepository,
|
||||||
'GmailMaildir': GmailMaildirRepository}
|
'GmailMaildir': GmailMaildirRepository}
|
||||||
|
|
||||||
elif reqtype == 'status':
|
elif reqtype == 'status':
|
||||||
# create and return a LocalStatusRepository.
|
# create and return a LocalStatusRepository.
|
||||||
@ -75,8 +75,8 @@ class Repository(object):
|
|||||||
try:
|
try:
|
||||||
repo = typemap[repostype]
|
repo = typemap[repostype]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
errstr = "'%s' repository not supported for '%s' repositories."% \
|
errstr = "'%s' repository not supported for '%s' repositories." % \
|
||||||
(repostype, reqtype)
|
(repostype, reqtype)
|
||||||
six.reraise(OfflineImapError,
|
six.reraise(OfflineImapError,
|
||||||
OfflineImapError(errstr, OfflineImapError.ERROR.REPO),
|
OfflineImapError(errstr, OfflineImapError.ERROR.REPO),
|
||||||
exc_info()[2])
|
exc_info()[2])
|
||||||
|
Loading…
Reference in New Issue
Block a user