diff options
author | anatoly techtonik <techtonik@gmail.com> | 2015-01-11 13:23:36 (GMT) |
---|---|---|
committer | anatoly techtonik <techtonik@gmail.com> | 2015-01-11 13:23:36 (GMT) |
commit | 2e17a095249dafe84d63309bf5a03b8a9b4961a7 (patch) | |
tree | 8384b5533ee3b1768dfe97e9ab866338042e9f5a /bin/SConsDoc.py | |
parent | 2d33788ee03708960bee8899129c244d957ee2be (diff) | |
download | SCons-2e17a095249dafe84d63309bf5a03b8a9b4961a7.zip SCons-2e17a095249dafe84d63309bf5a03b8a9b4961a7.tar.gz SCons-2e17a095249dafe84d63309bf5a03b8a9b4961a7.tar.bz2 |
SConsDoc.py: Calling sys.exit(-1) in imported library is bad, because
it removes the trace who and when imported it.
Diffstat (limited to 'bin/SConsDoc.py')
-rw-r--r-- | bin/SConsDoc.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/SConsDoc.py b/bin/SConsDoc.py index e1c2b0b..e435b4a 100644 --- a/bin/SConsDoc.py +++ b/bin/SConsDoc.py @@ -127,8 +127,7 @@ except: try: import lxml except: - print("Failed to import either libxml2/libxslt or lxml") - sys.exit(1) + raise ImportError("Failed to import either libxml2/libxslt or lxml") has_etree = False if not has_libxml2: @@ -154,8 +153,7 @@ if not has_etree: # normal ElementTree install import elementtree.ElementTree as etree except ImportError: - print("Failed to import ElementTree from any known place") - sys.exit(1) + raise ImportError("Failed to import ElementTree from any known place") re_entity = re.compile("\&([^;]+);") re_entity_header = re.compile("<!DOCTYPE\s+sconsdoc\s+[^\]]+\]>") |