minor: fix indentation

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2015-01-15 17:40:27 +01:00
parent d0cb96781c
commit cb6790b804
3 changed files with 11 additions and 9 deletions

View File

@ -56,7 +56,8 @@ class LocalStatusSQLiteFolder(BaseFolder):
if not os.path.exists(dirname):
os.makedirs(dirname)
if not os.path.isdir(dirname):
raise UserWarning("SQLite database path '%s' is not a directory." % dirname)
raise UserWarning("SQLite database path '%s' is not a directory."%
dirname)
# dblock protects against concurrent writes in same connection
self._dblock = Lock()
@ -67,14 +68,15 @@ class LocalStatusSQLiteFolder(BaseFolder):
except NameError:
# sqlite import had failed
raise UserWarning('SQLite backend chosen, but no sqlite python '
'bindings available. Please install.'), None, exc_info()[2]
'bindings available. Please install.'), None, exc_info()[2]
#Make sure sqlite is in multithreading SERIALIZE mode
assert sqlite.threadsafety == 1, 'Your sqlite is not multithreading safe.'
#Test if db version is current enough and if db is readable.
try:
cursor = self.connection.execute("SELECT value from metadata WHERE key='db_version'")
cursor = self.connection.execute(
"SELECT value from metadata WHERE key='db_version'")
except sqlite.DatabaseError:
#db file missing or corrupt, recreate it.
self.__create_db()

View File

@ -44,13 +44,13 @@ class Repository(object):
name = account.getconf('remoterepository')
# We don't support Maildirs on the remote side.
typemap = {'IMAP': IMAPRepository,
'Gmail': GmailRepository}
'Gmail': GmailRepository}
elif reqtype == 'local':
name = account.getconf('localrepository')
typemap = {'IMAP': MappedIMAPRepository,
'Maildir': MaildirRepository,
'GmailMaildir': GmailMaildirRepository}
'Maildir': MaildirRepository,
'GmailMaildir': GmailMaildirRepository}
elif reqtype == 'status':
# create and return a LocalStatusRepository
@ -69,7 +69,7 @@ class Repository(object):
errstr = ("Could not find section '%s' in configuration. Required "
"for account '%s'." % ('Repository %s' % name, account))
raise OfflineImapError(errstr, OfflineImapError.ERROR.REPO), \
None, exc_info()[2]
None, exc_info()[2]
try:
repo = typemap[repostype]
@ -77,7 +77,7 @@ class Repository(object):
errstr = "'%s' repository not supported for '%s' repositories." \
% (repostype, reqtype)
raise OfflineImapError(errstr, OfflineImapError.ERROR.REPO), \
None, exc_info()[2]
None, exc_info()[2]
return repo(name, account)

View File

@ -539,7 +539,7 @@ class UIBase(object):
abortsleep = False
while sleepsecs > 0 and not abortsleep:
if account.get_abort_event():
abortsleep = True
abortsleep = True
else:
abortsleep = self.sleeping(10, sleepsecs)
sleepsecs -= 10