summaryrefslogtreecommitdiffstats
path: root/libvir.py
diff options
context:
space:
mode:
Diffstat (limited to 'libvir.py')
-rw-r--r--libvir.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/libvir.py b/libvir.py
index 8a16dd0..3cda8dc 100644
--- a/libvir.py
+++ b/libvir.py
@@ -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