changeset 698:59860a15b617

svnwrap: improve error message when no bindings are found.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Tue, 14 Sep 2010 15:25:45 +0200
parents e9306b23d323
children 181ec1929b2a
files hgsubversion/svnwrap/__init__.py
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnwrap/__init__.py
+++ b/hgsubversion/svnwrap/__init__.py
@@ -23,11 +23,14 @@ elif choice == 'none':
 else:
     try:
         from subvertpy_wrapper import *
-    except ImportError, e:
+    except ImportError, e1:
         try:
             from svn_swig_wrapper import *
-        except ImportError:
-            # propagate the subvertpy error; it's easier to install
-            raise e
+        except ImportError, e2:
+            raise ImportError('no compatible bindings available:\n\n'
+                              '%s\n%s\n\n'
+                              'Please install either Subvertpy or the '
+                              'Subversion Python SWIG bindings'
+                              % (e2, e1))
 
 del os, choice