Skip to content

Commit

Permalink
Merge pull request #123 from jeremylinlin/remove-logging-for-identify
Browse files Browse the repository at this point in the history
Remove logging for identify
  • Loading branch information
kevinrizza authored May 3, 2019
2 parents e4409c1 + dcca447 commit 4f911bd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions operatorcourier/identify.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,14 @@ def get_operator_artifact_type(operatorArtifactString):
logger.error(msg)
raise OpCourierBadYaml(msg)
else:
artifact_type, artifact_name = None, None
artifact_type = None
if isinstance(operatorArtifact, dict):
if "packageName" in operatorArtifact:
artifact_type = "Package"
artifact_name = operatorArtifact['packageName']
elif operatorArtifact.get("kind") in ("ClusterServiceVersion",
"CustomResourceDefinition"):
artifact_type = operatorArtifact["kind"]
artifact_name = operatorArtifact['metadata']['name']
if artifact_type is not None:
logger.info('Parsed %s: %s', artifact_type, artifact_name)
return artifact_type

msg = 'Courier requires valid CSV, CRD, and Package files'
Expand Down

0 comments on commit 4f911bd

Please sign in to comment.