Skip to content

Commit

Permalink
More logging...
Browse files Browse the repository at this point in the history
  • Loading branch information
yeisonvargasf committed Sep 15, 2022
1 parent af2776f commit 5b953cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions safety/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,17 @@ def read_requirements(fh, resolve=True):
file_type = filetypes.requirements_txt

if not is_temp_file and is_supported_by_parser(fh.name):
LOG.debug('temp or not a compatible file')
LOG.debug('not temp and a compatible file')
path = fh.name
found = path
file_type = None

LOG.debug(f'Path: {path}')
LOG.debug(f'File Type: {file_type}')
LOG.debug('Trying to parse file using dparse...')
dependency_file = parse(fh.read(), path=path, resolve=resolve,
content = fh.read()
LOG.debug(f'Content: {content}')
dependency_file = parse(content, path=path, resolve=resolve,
file_type=file_type)
LOG.debug(f'Parsed, dependencies: {[dep.serialize() for dep in dependency_file.resolved_dependencies]}')
for dep in dependency_file.resolved_dependencies:
Expand Down

0 comments on commit 5b953cf

Please sign in to comment.