includehandler: Simplify code
Since 2077900b4e20, the existence of a repo key is enforced by the config schema. So we can drop the redundant check in the include handler. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
50e2d2d0fa
commit
6630780935
@ -201,12 +201,7 @@ class IncludeHandler:
|
|||||||
missing_repos.extend(rep)
|
missing_repos.extend(rep)
|
||||||
elif isinstance(include, Mapping):
|
elif isinstance(include, Mapping):
|
||||||
includerepo = include.get('repo', None)
|
includerepo = include.get('repo', None)
|
||||||
if includerepo is not None:
|
includedir = repos.get(includerepo, None)
|
||||||
includedir = repos.get(includerepo, None)
|
|
||||||
else:
|
|
||||||
raise IncludeException(
|
|
||||||
'"repo" is not specified: {}'
|
|
||||||
.format(include))
|
|
||||||
if includedir is not None:
|
if includedir is not None:
|
||||||
try:
|
try:
|
||||||
includefile = include['file']
|
includefile = include['file']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user