diff options
author | Matt Riedemann <mriedem@us.ibm.com> | 2014-06-25 10:32:32 -0700 |
---|---|---|
committer | Matt Riedemann <mriedem@us.ibm.com> | 2014-06-25 10:32:32 -0700 |
commit | bcf627bcf4c1587277d8665ef39f0a751dfe46e3 (patch) | |
tree | 55d95fbf4a16a8ebd65ead6f4865a2d11ad30c95 /nova/utils.py | |
parent | eb7b63d79d28581a7dd23645488de323b99f8463 (diff) | |
download | nova-bcf627bcf4c1587277d8665ef39f0a751dfe46e3.tar.gz |
Replace nova.utils.cpu_count() with processutils.get_worker_count()
cpu_count() was moved from nova to oslo-incubator via commit
85f178489a128a04a7ee3ed44018403caa109ef0 so it can be used in other
projects.
This change removes the duplicate code from nova and uses the renamed
method from oslo.
Change-Id: I03da77adf64e0495880343b7086f5907a2c5f75d
Diffstat (limited to 'nova/utils.py')
-rw-r--r-- | nova/utils.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/nova/utils.py b/nova/utils.py index 45a7f8da60..bf5a522926 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -22,7 +22,6 @@ import datetime import functools import hashlib import inspect -import multiprocessing import os import pyclbr import random @@ -1145,10 +1144,3 @@ def get_image_from_system_metadata(system_meta): def get_hash_str(base_str): """returns string that represents hash of base_str (in hex format).""" return hashlib.md5(base_str).hexdigest() - - -def cpu_count(): - try: - return multiprocessing.cpu_count() - except NotImplementedError: - return 1 |