diff --git a/scripts/generate_lock_file.py b/scripts/generate_lock_file.py index 9b37858c0e..5a0992902c 100755 --- a/scripts/generate_lock_file.py +++ b/scripts/generate_lock_file.py @@ -156,9 +156,10 @@ if __name__ == "__main__": packages = packages[:-1] for package in packages: + package = re.sub(r'\s#.*$', '', package).rstrip() # WAR: ignore lines with "-f": No tool exists to parse complex requirements.txt - if '-f' in package or \ - "#" in package or \ + if not package or \ + '-f' in package or \ package.startswith('--'): continue