threading: fix variable names about namespaces

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2016-05-19 08:35:45 +02:00
parent 0b32e787c7
commit a2a8a908ca
3 changed files with 7 additions and 5 deletions

View File

@ -60,6 +60,8 @@ class IMAPServer(object):
GSS_STATE_WRAP = 1 GSS_STATE_WRAP = 1
def __init__(self, repos): def __init__(self, repos):
""":repos: a IMAPRepository instance."""
self.ui = getglobalui() self.ui = getglobalui()
self.repos = repos self.repos = repos
self.config = repos.getconfig() self.config = repos.getconfig()

View File

@ -299,13 +299,13 @@ class OfflineImap:
# connections for a remote IMAP server, why do we allow twice this # connections for a remote IMAP server, why do we allow twice this
# number? The max connections number is used by both the FOLDER_ and # number? The max connections number is used by both the FOLDER_ and
# the MSGCOPY_ prefixes! # the MSGCOPY_ prefixes!
for instancename in [accounts.FOLDER_NAMESPACE + reposname, for namespace in [accounts.FOLDER_NAMESPACE + reposname,
MSGCOPY_NAMESPACE + reposname]: MSGCOPY_NAMESPACE + reposname]:
if options.singlethreading: if options.singlethreading:
threadutil.initInstanceLimit(instancename, 1) threadutil.initInstanceLimit(namespace, 1)
else: else:
threadutil.initInstanceLimit( threadutil.initInstanceLimit(
instancename, namespace,
config.getdefaultint( config.getdefaultint(
'Repository ' + reposname, 'Repository ' + reposname,
'maxconnections', 2) 'maxconnections', 2)

View File

@ -20,6 +20,7 @@ import os
from sys import exc_info from sys import exc_info
import netrc import netrc
import errno import errno
import six
from offlineimap.repository.Base import BaseRepository from offlineimap.repository.Base import BaseRepository
from offlineimap import folder, imaputil, imapserver, OfflineImapError from offlineimap import folder, imaputil, imapserver, OfflineImapError
@ -27,12 +28,11 @@ from offlineimap.folder.UIDMaps import MappedIMAPFolder
from offlineimap.threadutil import ExitNotifyThread from offlineimap.threadutil import ExitNotifyThread
from offlineimap.utils.distro import get_os_sslcertfile, get_os_sslcertfile_searchpath from offlineimap.utils.distro import get_os_sslcertfile, get_os_sslcertfile_searchpath
import six
class IMAPRepository(BaseRepository): class IMAPRepository(BaseRepository):
def __init__(self, reposname, account): def __init__(self, reposname, account):
"""Initialize an IMAPRepository object.""" """Initialize an IMAPRepository object."""
BaseRepository.__init__(self, reposname, account) BaseRepository.__init__(self, reposname, account)
# self.ui is being set by the BaseRepository # self.ui is being set by the BaseRepository
self._host = None self._host = None