summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2011-05-05 11:10:29 -0500
committerSol Jerome <sol.jerome@gmail.com>2011-05-05 11:10:29 -0500
commitb6c9928eced9b725d936260d003026f1ebfa455d (patch)
tree131ec7c84077b2348c8daa65405192c46b9d735d
parent23ae3d201af82292ad4e939569a50f2e32c689a3 (diff)
downloadbcfg2-b6c9928eced9b725d936260d003026f1ebfa455d.tar.gz
bcfg2-b6c9928eced9b725d936260d003026f1ebfa455d.tar.bz2
bcfg2-b6c9928eced9b725d936260d003026f1ebfa455d.zip
Core: Raise error on failed lxml import (Reported by Raul Cuza on IRC)
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
-rw-r--r--doc/help/faq/general.txt2
-rw-r--r--doc/help/troubleshooting.txt6
-rw-r--r--doc/installation/prerequisites.txt2
-rw-r--r--src/lib/Server/Core.py6
4 files changed, 13 insertions, 3 deletions
diff --git a/doc/help/faq/general.txt b/doc/help/faq/general.txt
index ae53ca399..ba5d1fda3 100644
--- a/doc/help/faq/general.txt
+++ b/doc/help/faq/general.txt
@@ -29,7 +29,7 @@ exact list of platforms on which Bcfg2 works.
**What pre-requisites are needed to run Bcfg2?**
-Please visit the :ref:`prerequisites` section in the manual.
+Please visit the :ref:`installation-prerequisites` section in the manual.
**Why won't bcfg2-server start?**
diff --git a/doc/help/troubleshooting.txt b/doc/help/troubleshooting.txt
index d758ca7a5..88a0febc5 100644
--- a/doc/help/troubleshooting.txt
+++ b/doc/help/troubleshooting.txt
@@ -148,6 +148,10 @@ be taken to remedy them.
| [list of unknown entries] | | has no knowledge of | |
| | | the listed entries | |
+------------------------------+----------+---------------------+--------------+
+| Failed to import lxml | Server | The server cannot | [12]_ |
+| dependency. Shutting | | import lxml | |
+| down server. | | | |
++------------------------------+----------+---------------------+--------------+
.. [1] This entry is not being bound. Ensure that a version of this
@@ -179,6 +183,8 @@ be taken to remedy them.
ignore the message as the Packages plugin has no knowledge of
these packages (however, note that this package is most often
specified as a BoundPackage entry).
+.. [12] Ensure that you have installed all the necessary
+ :ref:`installation-prerequisites`.
FAQs
====
diff --git a/doc/installation/prerequisites.txt b/doc/installation/prerequisites.txt
index deeaba203..be7ec6c85 100644
--- a/doc/installation/prerequisites.txt
+++ b/doc/installation/prerequisites.txt
@@ -1,6 +1,6 @@
.. -*- mode: rst -*-
-.. _prerequisites:
+.. _installation-prerequisites:
Prerequisites
=============
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py
index ac0a51e23..8f9d3e746 100644
--- a/src/lib/Server/Core.py
+++ b/src/lib/Server/Core.py
@@ -3,11 +3,15 @@ __revision__ = '$Revision$'
import atexit
import logging
-import lxml.etree
import select
import sys
import threading
import time
+try:
+ import lxml.etree
+except ImportError:
+ print("Failed to import lxml dependency. Shutting down server.")
+ raise SystemExit(1)
from Bcfg2.Component import Component, exposed
from Bcfg2.Server.Plugin import PluginInitError, PluginExecutionError