ParsedConfig.extend : raise TypeError

I think that ConfigItemUnknownErorr is the wrong exception to raise
here.  It is being raised in response to a class mismatch which seems
like it should be a TypeError.

In the follow-on I4851a5a796fa452a023e0e6193fc724ae0967a44 I am
proposing that ConfigItemUnknownError and related exceptions provide
some context on config snippet that has caused the error, and there
isn't a value that makes sense here.

Change-Id: I824600783e4724684d76d4c4dbaa9e0b4e92c7e5
This commit is contained in:
Ian Wienand 2020-07-31 10:57:01 +10:00
parent e1f73ae25b
commit 552de6af0f
1 changed files with 1 additions and 1 deletions

View File

@ -3751,7 +3751,7 @@ class ParsedConfig(object):
self.projects_by_regex.setdefault(regex, []).extend(projects)
return
else:
raise ConfigItemUnknownError()
raise TypeError()
class Layout(object):