Add call to coinitialize.

This commit is contained in:
voussoir 2021-09-23 22:42:30 -07:00
parent 5f6d291729
commit 7021308c9e
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -14,6 +14,9 @@ import os
import shutil import shutil
try: try:
import winshell import winshell
# This fixes some "CoInitialize has not been called" errors which I found
# were occuring intermittently on some subprocess calls.
winshell.pythoncom.CoInitialize()
except ImportError: except ImportError:
winshell = None winshell = None