pylint fixes
This commit is contained in:
parent
b38782f117
commit
2825ff643b
3 changed files with 7 additions and 11 deletions
|
|
@ -77,7 +77,7 @@ class Message(CapBaseObject):
|
||||||
@property
|
@property
|
||||||
def full_parent_id(self):
|
def full_parent_id(self):
|
||||||
if self.parent:
|
if self.parent:
|
||||||
return self.parent.full_id()
|
return self.parent.full_id
|
||||||
elif self._parent_id is None:
|
elif self._parent_id is None:
|
||||||
return ''
|
return ''
|
||||||
elif self._parent_id is NotLoaded:
|
elif self._parent_id is NotLoaded:
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ class ConsoleApplication(BaseApplication):
|
||||||
print '%sq)%s --stop--\n' % (self.BOLD, self.NC)
|
print '%sq)%s --stop--\n' % (self.BOLD, self.NC)
|
||||||
r = self.ask('Select a backend to add (q to stop)', regexp='^(\d+|q)$')
|
r = self.ask('Select a backend to add (q to stop)', regexp='^(\d+|q)$')
|
||||||
|
|
||||||
if r.isdigit():
|
if str(r).isdigit():
|
||||||
i = int(r) - 1
|
i = int(r) - 1
|
||||||
if i < 0 or i >= len(backends):
|
if i < 0 or i >= len(backends):
|
||||||
print >>sys.stderr, 'Error: %s is not a valid choice' % r
|
print >>sys.stderr, 'Error: %s is not a valid choice' % r
|
||||||
|
|
@ -178,13 +178,11 @@ class ConsoleApplication(BaseApplication):
|
||||||
for index, (name, backend) in enumerate(backends):
|
for index, (name, backend) in enumerate(backends):
|
||||||
print '%s%d)%s %s%-15s%s %s' % (self.BOLD, index + 1, self.NC, self.BOLD, name, self.NC,
|
print '%s%d)%s %s%-15s%s %s' % (self.BOLD, index + 1, self.NC, self.BOLD, name, self.NC,
|
||||||
backend.description)
|
backend.description)
|
||||||
response = self.ask('Select a backend to proceed', regexp='^\d+$')
|
i = int(self.ask('Select a backend to proceed', regexp='^\d+$'))
|
||||||
if response.isdigit():
|
if i < 0 or i >= len(backends):
|
||||||
i = int(response) - 1
|
print >>sys.stderr, 'Error: %s is not a valid choice' % i
|
||||||
if i < 0 or i >= len(backends):
|
continue
|
||||||
print >>sys.stderr, 'Error: %s is not a valid choice' % response
|
backend_name = backends[i][0]
|
||||||
continue
|
|
||||||
backend_name = backends[i][0]
|
|
||||||
else:
|
else:
|
||||||
raise BackendNotGiven('Please specify a backend to use for this argument (%s@backend_name). '
|
raise BackendNotGiven('Please specify a backend to use for this argument (%s@backend_name). '
|
||||||
'Availables: %s.' % (_id, ', '.join(name for name, backend in backends)))
|
'Availables: %s.' % (_id, ', '.join(name for name, backend in backends)))
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,6 @@ class BaseBackend(object):
|
||||||
DESCRIPTION = '<unspecified>'
|
DESCRIPTION = '<unspecified>'
|
||||||
# License of this backend.
|
# License of this backend.
|
||||||
LICENSE = '<unspecified>'
|
LICENSE = '<unspecified>'
|
||||||
# Icon file path
|
|
||||||
ICON = None
|
|
||||||
# Configuration required for this backend.
|
# Configuration required for this backend.
|
||||||
# Values must be weboob.tools.value.Value objects.
|
# Values must be weboob.tools.value.Value objects.
|
||||||
CONFIG = {}
|
CONFIG = {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue