Skip to content

Commit

Permalink
fix(#4274): Skip requirements file empty lines and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
GGP1 committed Sep 19, 2023
1 parent 9b97442 commit 7022c30
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deps/wazuh_testing/wazuh_testing/tools/scans/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def prepare_input(pip_mode, input_file_path):
with open(input_file_path, mode='r') as input_file:
lines = input_file.readlines()
for line in lines:
if line.startswith('\n') or line.startswith('#'):
continue
line = re.sub('[<>~]', '=', line)
if ',' in line:
package_version = max(re.findall(r'\d+\.+\d*\.*\d', line))
Expand Down

0 comments on commit 7022c30

Please sign in to comment.