mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Better error reporting if 'import libvirtmod' fails
Don't squash a possibly legitimate libvirtmod error (e.g. some from clashing libvirt.so versions) with 'Cannot import cygvirtmod'
This commit is contained in:
@@ -8,8 +8,12 @@
|
||||
# On cygwin, the DLL is called cygvirtmod.dll
|
||||
try:
|
||||
import libvirtmod
|
||||
except:
|
||||
import cygvirtmod as libvirtmod
|
||||
except ImportError, lib_e:
|
||||
try:
|
||||
import cygvirtmod as libvirtmod
|
||||
except ImportError, cyg_e:
|
||||
if str(cyg_e).count("No module named"):
|
||||
raise lib_e
|
||||
|
||||
import types
|
||||
|
||||
|
||||
Reference in New Issue
Block a user