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
|
||||
|
||||
def __getattr__(self, item):
|
||||
# pylint: disable=no-else-return
|
||||
if item == 'layers':
|
||||
if not self._layers:
|
||||
return [self.path]
|
||||
@ -62,9 +63,8 @@ class Repo:
|
||||
.replace(':', '.')
|
||||
.replace('/', '.')
|
||||
.replace('*', '.'))
|
||||
else:
|
||||
# Default behaviour
|
||||
raise AttributeError
|
||||
# Default behaviour
|
||||
raise AttributeError
|
||||
|
||||
def __str__(self):
|
||||
return '%s:%s %s %s' % (self.url, self.refspec,
|
||||
@ -267,10 +267,10 @@ class RepoImpl(Repo):
|
||||
'entry: %s, vcs output: %s)',
|
||||
path, self.name, patch['id'], output)
|
||||
return 1
|
||||
else:
|
||||
logging.info('Patch applied. '
|
||||
'(patch path: %s, repo: %s, patch entry: %s)',
|
||||
path, self.name, patch['id'])
|
||||
|
||||
logging.info('Patch applied. '
|
||||
'(patch path: %s, repo: %s, patch entry: %s)',
|
||||
path, self.name, patch['id'])
|
||||
return 0
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user