summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/lib/Server/Reports/importscript.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/lib/Server/Reports/importscript.py b/src/lib/Server/Reports/importscript.py
index 1a4ccea23..34e6eef82 100755
--- a/src/lib/Server/Reports/importscript.py
+++ b/src/lib/Server/Reports/importscript.py
@@ -4,13 +4,10 @@ __revision__ = '$Revision$'
import os, sys, binascii
try:
- import settings
-except ImportError:
- try:
- import Bcfg2.Server.Reports.settings
- except ImportError:
- sys.stderr.write("Failed to locate settings.py. Is Bcfg2.Server.Reports python module installed?")
- sys.exit(1)
+ import Bcfg2.Server.Reports.settings
+except:
+ sys.stderr.write("Failed to load configuration settings. is /etc/bcfg2.conf readable?")
+ sys.exit(1)
project_directory = os.path.dirname(settings.__file__)
project_name = os.path.basename(project_directory)