mirror of
https://github.com/bndr/pipreqs.git
synced 2025-06-06 03:25:21 +00:00
Fix 227
This commit is contained in:
parent
be812e4884
commit
e174f9ca1a
5
.gitignore
vendored
5
.gitignore
vendored
@ -52,7 +52,4 @@ Session.vim
|
||||
.netrwhist
|
||||
*~
|
||||
|
||||
/pipreqs/*.bak
|
||||
.vscode/settings.json
|
||||
.gitignore
|
||||
|
||||
/pipreqs/*.bak
|
@ -19,7 +19,8 @@ Options:
|
||||
parameter in your terminal:
|
||||
$ export HTTP_PROXY="http://10.10.1.10:3128"
|
||||
$ export HTTPS_PROXY="https://10.10.1.10:1080"
|
||||
--trusted-host Ignore SSL warnings, recommended using with enterprise proxy.
|
||||
--trusted-host Ignore SSL warnings, recommended using with
|
||||
enterprise proxy.
|
||||
--debug Print debug information.
|
||||
--ignore <dirs>... Ignore extra directories, each separated by a comma.
|
||||
--no-follow-links Do not follow symbolic links in the project
|
||||
@ -182,13 +183,15 @@ def output_requirements(imports):
|
||||
|
||||
|
||||
def get_imports_info(
|
||||
imports, pypi_server="https://pypi.python.org/pypi/", proxy=None, verify_ssl=True):
|
||||
imports, pypi_server="https://pypi.python.org/pypi/", proxy=None,
|
||||
verify_ssl=True):
|
||||
result = []
|
||||
|
||||
for item in imports:
|
||||
try:
|
||||
response = requests.get(
|
||||
"{0}{1}/json".format(pypi_server, item), proxies=proxy, verify=verify_ssl)
|
||||
"{0}{1}/json".format(pypi_server, item), proxies=proxy,
|
||||
verify=verify_ssl)
|
||||
if response.status_code == 200:
|
||||
if hasattr(response.content, 'decode'):
|
||||
data = json2package(response.content.decode())
|
||||
|
Loading…
x
Reference in New Issue
Block a user