summaryrefslogtreecommitdiffstats
path: root/bin/SConsDoc.py
diff options
context:
space:
mode:
authoranatoly techtonik <techtonik@gmail.com>2015-01-11 13:23:36 (GMT)
committeranatoly techtonik <techtonik@gmail.com>2015-01-11 13:23:36 (GMT)
commit2e17a095249dafe84d63309bf5a03b8a9b4961a7 (patch)
tree8384b5533ee3b1768dfe97e9ab866338042e9f5a /bin/SConsDoc.py
parent2d33788ee03708960bee8899129c244d957ee2be (diff)
downloadSCons-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.py6
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+[^\]]+\]>")