Browse Source

Don't fail on '-e' in requirements.txt

master
Johann Schmitz 5 years ago
parent
commit
d9a8b19412
Signed by: ercpe GPG Key ID: A084064277C501ED
  1. 4
      src/gitbrowser/utils/deps.py

4
src/gitbrowser/utils/deps.py

@ -11,6 +11,8 @@ class PkgResourceWrapper(object):
def __str__(self):
return str(self.requirement)
class PythonRequirements(object):
def parse(self, content):
return [PkgResourceWrapper(req) for req in parse_requirements(content)]
return [PkgResourceWrapper(req) for req in parse_requirements('\n'.join([line for line in content.splitlines() if not line.startswith('-e')]))]