Make the multithreaded coinitialize only on 64bit

Change-Id: I5d44efb634051f00cd3ca54b99ce0dea806543be
This commit is contained in:
Cosmin Poieana 2015-10-16 20:29:50 +03:00
parent 8c6ab772a6
commit eeaa425123
1 changed files with 7 additions and 3 deletions

View File

@ -12,11 +12,15 @@
# License for the specific language governing permissions and limitations
# under the License.
import struct
import sys
import pythoncom
sys.coinit_flags = pythoncom.COINIT_MULTITHREADED
pythoncom.CoInitializeEx(pythoncom.COINIT_MULTITHREADED)
if struct.calcsize("P") == 8 and sys.platform == 'win32':
# This is needed by Nano Server.
# Set COINIT_MULTITHREADED only on x64 interpreters due to issues on x86.
import pythoncom
sys.coinit_flags = pythoncom.COINIT_MULTITHREADED
pythoncom.CoInitializeEx(pythoncom.COINIT_MULTITHREADED)
from oslo_config import cfg
from oslo_log import log as oslo_logging