From: Ondrej Lichtner <olichtne(a)redhat.com>
We agreed that it would be a good idea to print information about loaded
config files. The original idea was to print this information to the
debug logs. However config files are loaded before logging is
initialized so that is not possible. Instead I used a simple print.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst-ctl | 1 -
lnst/Common/Config.py | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnst-ctl b/lnst-ctl
index a51b2d6..ac71925 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -172,7 +172,6 @@ def main():
print "File '%s' doesn't exist!" % config_path
usage(RETVAL_ERR)
else:
- print "Loading config file '%s'" % config_path
lnst_config.load_config(config_path)
if coloured_output:
diff --git a/lnst/Common/Config.py b/lnst/Common/Config.py
index 8c749c4..3255311 100644
--- a/lnst/Common/Config.py
+++ b/lnst/Common/Config.py
@@ -135,6 +135,7 @@ class Config():
exp_path = os.path.expanduser(path)
abs_path = os.path.abspath(exp_path)
parser = ConfigParser(dict_type=dict)
+ print "Loading config file '%s'" % abs_path
parser.read(abs_path)
sections = parser._sections
--
1.8.3.1