diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2016-10-18 11:11:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-18 11:11:59 -0400 |
commit | 7d984bbdc111fcdfef816265e159a3054dbee132 (patch) | |
tree | 3a25ce5765a8c9ae633a3eaeec1ce88f7b382e21 /setuptools/package_index.py | |
parent | f774a0be095c3873c2881d393605fefa5ca0d0d6 (diff) | |
parent | 31bd37c6ac8de9e8c1bacebc2d8e1215df91eb96 (diff) | |
download | external_python_setuptools-7d984bbdc111fcdfef816265e159a3054dbee132.tar.gz external_python_setuptools-7d984bbdc111fcdfef816265e159a3054dbee132.tar.bz2 external_python_setuptools-7d984bbdc111fcdfef816265e159a3054dbee132.zip |
Merge pull request #820 from stepshal/blank
Fix quantity of blank lines.
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-x | setuptools/package_index.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 3e8d6818..3bb97154 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -47,7 +47,6 @@ __all__ = [ _SOCKET_TIMEOUT = 15 - _tmpl = "setuptools/{setuptools.__version__} Python-urllib/{py_major}" user_agent = _tmpl.format(py_major=sys.version[:3], **globals()) @@ -198,9 +197,11 @@ def unique_values(func): Wrap a function returning an iterable such that the resulting iterable only ever yields unique items. """ + @wraps(func) def wrapper(*args, **kwargs): return unique_everseen(func(*args, **kwargs)) + return wrapper @@ -415,6 +416,7 @@ class PackageIndex(Environment): def process_index(self, url, page): """Process the contents of a PyPI page""" + def scan(link): # Process a URL to see if it's for a package page if link.startswith(self.index_url): @@ -946,7 +948,9 @@ def socket_timeout(timeout=15): return func(*args, **kwargs) finally: socket.setdefaulttimeout(old_timeout) + return _socket_timeout + return _socket_timeout @@ -991,7 +995,6 @@ class Credential(object): class PyPIConfig(configparser.RawConfigParser): - def __init__(self): """ Load from ~/.pypirc |