You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ni...@apache.org on 2014/10/11 11:09:31 UTC
[06/50] [abbrv] git commit: Fixed path issue for the agent.conf file
Fixed path issue for the agent.conf file
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/f65c19a7
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/f65c19a7
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/f65c19a7
Branch: refs/heads/master
Commit: f65c19a77b1f761dcb830c19cc7b3e8fe7d715b9
Parents: ed08e2d
Author: Chamila de Alwis <ch...@wso2.com>
Authored: Tue Sep 23 23:44:51 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Sat Oct 11 14:38:28 2014 +0530
----------------------------------------------------------------------
.../modules/config/cartridgeagentconfiguration.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/f65c19a7/tools/python-cartridge-agent/cartridge-agent/modules/config/cartridgeagentconfiguration.py
----------------------------------------------------------------------
diff --git a/tools/python-cartridge-agent/cartridge-agent/modules/config/cartridgeagentconfiguration.py b/tools/python-cartridge-agent/cartridge-agent/modules/config/cartridgeagentconfiguration.py
index 495d759..dea6ecc 100644
--- a/tools/python-cartridge-agent/cartridge-agent/modules/config/cartridgeagentconfiguration.py
+++ b/tools/python-cartridge-agent/cartridge-agent/modules/config/cartridgeagentconfiguration.py
@@ -1,5 +1,6 @@
import ConfigParser
import logging
+import os
from .. util import cartridgeagentconstants
from .. exception.parameternotfoundexception import ParameterNotFoundException
@@ -148,8 +149,11 @@ class CartridgeAgentConfiguration:
:return:
"""
+ base_working_dir = os.path.abspath(os.path.dirname(__file__)).replace("modules/config", "")
+ conf_file_path = base_working_dir + "agent.conf"
+ self.log.debug("Config file path : %r" % conf_file_path)
self.properties = ConfigParser.SafeConfigParser()
- self.properties.read('agent.conf')
+ self.properties.read(conf_file_path)
def __read_parameter_file(self):
"""
@@ -173,6 +177,7 @@ class CartridgeAgentConfiguration:
def read_property(self, property_key):
if self.properties.has_option("agent", property_key):
+ self.log.debug("Has key: %r" % property_key)
temp_str = self.properties.get("agent", property_key)
if temp_str != "" and temp_str is not None:
return temp_str