Add docstrings for utils.host

Cleaning up a little technical debt by adding docstrings
for our public APIs.

Note: I plan to submit a patch per file as part of this bug work.
These patches won't depend on each other. The last patch of
the series will close the bug.

Change-Id: Ib848349ae8f7497aa9f2646e8db20c26aa4f3d8c
Partial-Bug: #1614594
This commit is contained in:
Boden R 2016-08-22 16:46:13 -06:00
parent 72c7cd2d31
commit 0f80b98b03

View File

@ -15,6 +15,11 @@ import multiprocessing
def cpu_count(): def cpu_count():
"""Get the system CPU count.
:returns: The number of CPUs on the system as an int. If there's an issue
fetching the CPU count on the system, a default value of 1 is returned.
"""
try: try:
return multiprocessing.cpu_count() return multiprocessing.cpu_count()
except NotImplementedError: except NotImplementedError: