Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Aug 10, 2021. It is now read-only.

Commit 43cf56d

Browse filesBrowse files
author
Kenneth Reitz
committed
fix for pip-grep
1 parent 2116d8a commit 43cf56d
Copy full SHA for 43cf56d

File tree

Expand file treeCollapse file tree

1 file changed

+8
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-5
lines changed

‎bin/pip-grep

Copy file name to clipboardExpand all lines: bin/pip-grep
+8-5Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,15 @@ def grep(reqfile, packages):
4343
exit(os.EX_NOINPUT)
4444

4545
for requirement in r.requirements:
46-
if requirement.req.project_name in packages:
47-
print 'Package {} found!'.format(requirement.req.project_name)
48-
exit(0)
4946

50-
print 'Not found.'.format(requirement.req.project_name)
51-
exit(1)
47+
if requirement.req:
48+
49+
if requirement.req.project_name in packages:
50+
print 'Package {} found!'.format(requirement.req.project_name)
51+
exit(0)
52+
53+
print 'Not found.'.format(requirement.req.project_name)
54+
exit(1)
5255

5356

5457
def main():

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.