mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #8076 from AccelerationNet/develop
pip freeze output has comments sometimes: ignore them
This commit is contained in:
commit
9153576eb0
@ -767,8 +767,9 @@ def list_(prefix=None,
|
|||||||
raise CommandExecutionError(result['stderr'])
|
raise CommandExecutionError(result['stderr'])
|
||||||
|
|
||||||
for line in result['stdout'].splitlines():
|
for line in result['stdout'].splitlines():
|
||||||
if line.startswith('-f'):
|
if line.startswith('-f') or line.startswith('#'):
|
||||||
# ignore -f line as it contains --find-links directory
|
# ignore -f line as it contains --find-links directory
|
||||||
|
# ignore comment lines
|
||||||
continue
|
continue
|
||||||
elif line.startswith('-e'):
|
elif line.startswith('-e'):
|
||||||
line = line.split('-e ')[1]
|
line = line.split('-e ')[1]
|
||||||
|
Loading…
Reference in New Issue
Block a user