X7ROOT File Manager
Current Path:
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util
usr
/
lib
/
python2.7
/
site-packages
/
pip
/
_vendor
/
urllib3
/
util
/
ðŸ“
..
📄
__init__.py
(1.02 KB)
📄
__init__.pyc
(1.25 KB)
📄
__init__.pyo
(1.25 KB)
📄
connection.py
(4.14 KB)
📄
connection.pyc
(3.78 KB)
📄
connection.pyo
(3.78 KB)
📄
request.py
(3.62 KB)
📄
request.pyc
(3.67 KB)
📄
request.pyo
(3.67 KB)
📄
response.py
(2.29 KB)
📄
response.pyc
(2.24 KB)
📄
response.pyo
(2.24 KB)
📄
retry.py
(14.75 KB)
📄
retry.pyc
(14.38 KB)
📄
retry.pyo
(14.38 KB)
📄
selectors.py
(20.65 KB)
📄
selectors.pyc
(20.49 KB)
📄
selectors.pyo
(20.49 KB)
📄
ssl_.py
(11.93 KB)
📄
ssl_.pyc
(10.36 KB)
📄
ssl_.pyo
(10.36 KB)
📄
timeout.py
(9.53 KB)
📄
timeout.pyc
(9.49 KB)
📄
timeout.pyo
(9.49 KB)
📄
url.py
(6.64 KB)
📄
url.pyc
(6.61 KB)
📄
url.pyo
(6.61 KB)
📄
wait.py
(1.42 KB)
📄
wait.pyc
(1.8 KB)
📄
wait.pyo
(1.8 KB)
Editing: wait.py
from .selectors import ( HAS_SELECT, DefaultSelector, EVENT_READ, EVENT_WRITE ) def _wait_for_io_events(socks, events, timeout=None): """ Waits for IO events to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can be interacted with immediately. """ if not HAS_SELECT: raise ValueError('Platform does not have a selector') if not isinstance(socks, list): # Probably just a single socket. if hasattr(socks, "fileno"): socks = [socks] # Otherwise it might be a non-list iterable. else: socks = list(socks) with DefaultSelector() as selector: for sock in socks: selector.register(sock, events) return [key[0].fileobj for key in selector.select(timeout) if key[1] & events] def wait_for_read(socks, timeout=None): """ Waits for reading to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can be read from immediately. """ return _wait_for_io_events(socks, EVENT_READ, timeout) def wait_for_write(socks, timeout=None): """ Waits for writing to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can be written to immediately. """ return _wait_for_io_events(socks, EVENT_WRITE, timeout)
Upload File
Create Folder