repos: Raise exception if attribute is unknown in __getattr__
pylint reports R: 52, 4: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements) According the Python documentation we should raise AttributeError if the key is unknown. Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
This commit is contained in:
parent
90315d47bf
commit
8a87f09c70
@ -62,6 +62,9 @@ class Repo:
|
||||
.replace(':', '.')
|
||||
.replace('/', '.')
|
||||
.replace('*', '.'))
|
||||
else:
|
||||
# Default behaviour
|
||||
raise AttributeError
|
||||
|
||||
def __str__(self):
|
||||
return '%s:%s %s %s' % (self.url, self.refspec,
|
||||
|
Loading…
Reference in New Issue
Block a user