rename ICap to Cap (closes #1424)
This commit is contained in:
parent
51958135cb
commit
e025fb0b20
244 changed files with 679 additions and 679 deletions
|
|
@ -31,7 +31,7 @@ from tempfile import NamedTemporaryFile
|
|||
from ssl import SSLError
|
||||
|
||||
from weboob.capabilities import UserError
|
||||
from weboob.capabilities.account import ICapAccount, Account, AccountRegisterError
|
||||
from weboob.capabilities.account import CapAccount, Account, AccountRegisterError
|
||||
from weboob.core.backendscfg import BackendAlreadyExists
|
||||
from weboob.core.modules import ModuleLoadError
|
||||
from weboob.core.repositories import ModuleInstallError
|
||||
|
|
@ -238,7 +238,7 @@ class ConsoleApplication(BaseApplication):
|
|||
print('Backend "%s" does not exist.' % name, file=sys.stderr)
|
||||
return 1
|
||||
|
||||
if not backend.has_caps(ICapAccount) or backend.klass.ACCOUNT_REGISTER_PROPERTIES is None:
|
||||
if not backend.has_caps(CapAccount) or backend.klass.ACCOUNT_REGISTER_PROPERTIES is None:
|
||||
print('You can\'t register a new account with %s' % name, file=sys.stderr)
|
||||
return 1
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ from logging import warning
|
|||
from weboob.core.modules import ModuleLoadError
|
||||
from weboob.core.repositories import IProgress, ModuleInstallError
|
||||
from weboob.core.backendscfg import BackendAlreadyExists
|
||||
from weboob.capabilities.account import ICapAccount, Account, AccountRegisterError
|
||||
from weboob.capabilities.account import CapAccount, Account, AccountRegisterError
|
||||
from weboob.tools.application.qt.backendcfg_ui import Ui_BackendCfg
|
||||
from weboob.tools.application.qt.reposdlg_ui import Ui_RepositoriesDlg
|
||||
from weboob.tools.ordereddict import OrderedDict
|
||||
|
|
@ -378,9 +378,9 @@ class BackendCfg(QDialog):
|
|||
module.license,
|
||||
(unicode(self.tr('<b>Website</b>: %s<br />')) % module.website) if module.website else '',
|
||||
module.description,
|
||||
', '.join(sorted(cap.__name__.replace('ICap', '') for cap in module.iter_caps()))))
|
||||
', '.join(sorted(cap.__name__.replace('Cap', '') for cap in module.iter_caps()))))
|
||||
|
||||
if module.has_caps(ICapAccount) and self.ui.nameEdit.isEnabled() and \
|
||||
if module.has_caps(CapAccount) and self.ui.nameEdit.isEnabled() and \
|
||||
module.klass.ACCOUNT_REGISTER_PROPERTIES is not None:
|
||||
self.ui.registerButton.show()
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ from weboob.tools.application.formatters.iformatter import MandatoryFieldsNotFou
|
|||
from weboob.tools.misc import to_unicode
|
||||
from weboob.tools.path import WorkingPath
|
||||
from weboob.tools.ordereddict import OrderedDict
|
||||
from weboob.capabilities.collection import Collection, BaseCollection, ICapCollection, CollectionNotFound
|
||||
from weboob.capabilities.collection import Collection, BaseCollection, CapCollection, CollectionNotFound
|
||||
|
||||
from .console import BackendNotGiven, ConsoleApplication
|
||||
from .formatters.load import FormattersLoader, FormatterLoadError
|
||||
|
|
@ -1102,7 +1102,7 @@ class ReplApplication(Cmd, ConsoleApplication):
|
|||
try:
|
||||
for backend, res in self.do('get_collection', objs=self.COLLECTION_OBJECTS,
|
||||
split_path=self.working_path.get(),
|
||||
caps=ICapCollection):
|
||||
caps=CapCollection):
|
||||
if res:
|
||||
collections.append(res)
|
||||
except CallErrors as errors:
|
||||
|
|
@ -1125,7 +1125,7 @@ class ReplApplication(Cmd, ConsoleApplication):
|
|||
try:
|
||||
for backend, res in self.do('iter_resources', objs=objs,
|
||||
split_path=split_path,
|
||||
caps=ICapCollection):
|
||||
caps=CapCollection):
|
||||
yield res
|
||||
except CallErrors as errors:
|
||||
self.bcall_errors_handler(errors, CollectionNotFound)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue