mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00: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:
parent
de658ab4e4
commit
5b13f4375d
@ -1,3 +1,7 @@
|
||||
Tue May 19 09:00:43 EDT 2009 Cole Robinson <crobinso@redhat.com>
|
||||
|
||||
* python/libvir.py: Don't overwrite legitimate python import error.
|
||||
|
||||
Tue May 19 12:04:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
Fix misc locking bugs identified by lock checker
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user