Browse Source

Warned if import bind10_dns or bind10_xfr failed.

git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1696 e5f2f494-b856-4b98-b285-d166d9295462
Likun Zhang 15 years ago
parent
commit
441a663847
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/bin/xfrout/xfrout.py.in

+ 4 - 2
src/bin/xfrout/xfrout.py.in

@@ -32,8 +32,10 @@ from optparse import OptionParser, OptionValueError
 try:
     from bind10_xfr import *
     from bind10_dns import *
-except:
-    pass
+except ImportError as e:
+    # C++ loadable module may not be installed; even so the xfrout process
+    # must keep running, so we warn about it and move forward.
+    sys.stderr.write('[b10-xfrout] failed to import DNS or XFR module: %s\n' % str(e))
 
 if "B10_FROM_SOURCE" in os.environ:
     SPECFILE_PATH = os.environ["B10_FROM_SOURCE"] + "/src/bin/xfrout"