diff --git a/offlineimap/folder/LocalStatusSQLite.py b/offlineimap/folder/LocalStatusSQLite.py index 7dceec1..4f5efb1 100644 --- a/offlineimap/folder/LocalStatusSQLite.py +++ b/offlineimap/folder/LocalStatusSQLite.py @@ -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() diff --git a/offlineimap/repository/__init__.py b/offlineimap/repository/__init__.py index 076255e..59a7bb6 100644 --- a/offlineimap/repository/__init__.py +++ b/offlineimap/repository/__init__.py @@ -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) diff --git a/offlineimap/ui/UIBase.py b/offlineimap/ui/UIBase.py index 3c6e499..41ce1a4 100644 --- a/offlineimap/ui/UIBase.py +++ b/offlineimap/ui/UIBase.py @@ -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