From d6110a175c9d422d2140de8cd7d058ea7835a494 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Wed, 18 Jul 2018 14:50:19 +0200 Subject: [PATCH] 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 --- kas/repos.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kas/repos.py b/kas/repos.py index c5d1ce3..2e44bab 100644 --- a/kas/repos.py +++ b/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