repos: Fix unnecessary "else" after "return"
pylint reports: kas/repos.py:53:8: R1705: Unnecessary "else" after "return" (no-else-return) kas/repos.py:264:12: R1705: Unnecessary "else" after "return" (no-else-return) Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
This commit is contained in:
parent
9fc8c7735c
commit
d6110a175c
14
kas/repos.py
14
kas/repos.py
@ -50,6 +50,7 @@ class Repo:
|
|||||||
self.operations_disabled = disable_operations
|
self.operations_disabled = disable_operations
|
||||||
|
|
||||||
def __getattr__(self, item):
|
def __getattr__(self, item):
|
||||||
|
# pylint: disable=no-else-return
|
||||||
if item == 'layers':
|
if item == 'layers':
|
||||||
if not self._layers:
|
if not self._layers:
|
||||||
return [self.path]
|
return [self.path]
|
||||||
@ -62,9 +63,8 @@ class Repo:
|
|||||||
.replace(':', '.')
|
.replace(':', '.')
|
||||||
.replace('/', '.')
|
.replace('/', '.')
|
||||||
.replace('*', '.'))
|
.replace('*', '.'))
|
||||||
else:
|
# Default behaviour
|
||||||
# Default behaviour
|
raise AttributeError
|
||||||
raise AttributeError
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return '%s:%s %s %s' % (self.url, self.refspec,
|
return '%s:%s %s %s' % (self.url, self.refspec,
|
||||||
@ -267,10 +267,10 @@ class RepoImpl(Repo):
|
|||||||
'entry: %s, vcs output: %s)',
|
'entry: %s, vcs output: %s)',
|
||||||
path, self.name, patch['id'], output)
|
path, self.name, patch['id'], output)
|
||||||
return 1
|
return 1
|
||||||
else:
|
|
||||||
logging.info('Patch applied. '
|
logging.info('Patch applied. '
|
||||||
'(patch path: %s, repo: %s, patch entry: %s)',
|
'(patch path: %s, repo: %s, patch entry: %s)',
|
||||||
path, self.name, patch['id'])
|
path, self.name, patch['id'])
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user