Skip to content

Commit

Permalink
Removes Dead Code from ImageLoader (anchore#1034)
Browse files Browse the repository at this point in the history
Inside the ImageLoader.load_package_verification method at the very
end near the return statement was 13 lines of code commented out with
no explanation as to why they needed to stay.

This patch removes those 13 lines of unused and undocumented code.

Closes: ENTERPRISE-309

Signed-off-by: Ryan Brady <[email protected]>
  • Loading branch information
Ryan Brady authored Jul 28, 2021
1 parent 2ad7716 commit 5a5c492
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions anchore_engine/services/policy_engine/engine/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,20 +280,6 @@ def load_package_verification(self, analysis_report, image_obj):

return True

# records = []
# for pkg_name, paths in packages.items():
#
# r = AnalysisArtifact()
# r.image_user_id = image_obj.user_id
# r.image_id = image_obj.id
# r.analyzer_type = 'base'
# r.analyzer_id = 'file_package_verify'
# r.analyzer_artifact = 'distro.pkgfilemeta'
# r.artifact_key = pkg_name
# r.json_value = paths
# records.append(r)
# return records

def load_retrieved_files(self, analysis_report, image_obj):
"""
Loads the analyzer retrieved files from the image, saves them in the db
Expand Down

0 comments on commit 5a5c492

Please sign in to comment.