Skip to content

Commit

Permalink
fix: key error from detect for operatorsfromtca transformer (#1080)
Browse files Browse the repository at this point in the history
* fix: resolve key error in detect.py

Signed-off-by: ChillOrb <[email protected]>
  • Loading branch information
ChillOrb authored Aug 24, 2023
1 parent 516df66 commit 29c061c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ def detect(input_dir):
with open(fullFilePath) as f:
collectFile = yaml.safe_load(f)
# print("collectFile:", collectFile)
if (
"apiVersion" not in collectFile
or collectFile["apiVersion"] != "move2kube.konveyor.io/v1alpha1"
):
if "apiVersion" not in collectFile:
print(f"apiVersion key missing in the file:{fullFilePath}")
continue
if collectFile["apiVersion"] != "move2kube.konveyor.io/v1alpha1":
print(
f"apiVersion does not match. Expected: 'move2kube.konveyor.io/v1alpha1' Actual: {collectFile['apiVersion']}"
)
Expand Down

0 comments on commit 29c061c

Please sign in to comment.