image-info: fix undefined variable in analyse_directory()

One branch of the analyse_directory() function's if statement used
undefined variable `repo`. Copy its existing definition already used in
the function.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
Tomas Hozza 2021-09-20 14:36:45 +02:00 committed by Achilleas Koutsou
parent 7b37c92bea
commit 4854b5730c

View file

@ -2242,6 +2242,7 @@ def analyse_directory(path):
append_ostree_repo(report, repo)
elif os.path.isdir(os.path.join(path, "refs")):
report["type"] = "ostree/repo"
repo = os.path.join(path, "repo")
append_ostree_repo(report, repo)
else:
append_directory(report, path)