提交 5b13f437 编写于 作者: C Cole Robinson

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'
上级 de658ab4
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册