summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoranatoly techtonik <techtonik@gmail.com>2015-01-11 16:23:36 +0300
committeranatoly techtonik <techtonik@gmail.com>2015-01-11 16:23:36 +0300
commitb9b0d7dd9acb535c073cc7fd204f01743d7a680b (patch)
tree8384b5533ee3b1768dfe97e9ab866338042e9f5a /bin
parentf32e4d09f7807c2139d342a26d4c622b98d34aaa (diff)
downloadscons-b9b0d7dd9acb535c073cc7fd204f01743d7a680b.tar.gz
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')
-rw-r--r--bin/SConsDoc.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/SConsDoc.py b/bin/SConsDoc.py
index e1c2b0bb..e435b4a7 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+[^\]]+\]>")