diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2008-03-09 16:28:31 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2008-03-09 16:28:31 +0000 |
commit | 721c80c052afc40cb4dac5fb2ee52435129e2c6f (patch) | |
tree | bf1b2f248729024cee871b72e354c0906df55d32 /src/lib | |
parent | 7e710d354643c34d585415d67136c6513519adf7 (diff) | |
download | bcfg2-721c80c052afc40cb4dac5fb2ee52435129e2c6f.tar.gz bcfg2-721c80c052afc40cb4dac5fb2ee52435129e2c6f.tar.bz2 bcfg2-721c80c052afc40cb4dac5fb2ee52435129e2c6f.zip |
Improve importscript error message when bcfg2.conf is not readable (Resolves Ticket #527) [bugfix]
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4411 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rwxr-xr-x | src/lib/Server/Reports/importscript.py | 11 |
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) |