summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/Client/Proxy.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/Client/Proxy.py b/src/lib/Client/Proxy.py
index 17a1b0ff2..304d6bc3a 100644
--- a/src/lib/Client/Proxy.py
+++ b/src/lib/Client/Proxy.py
@@ -1,7 +1,7 @@
'''Cobalt proxy provides client access to cobalt components'''
__revision__ = '$Revision$'
-import logging, socket, time, xmlrpclib, ConfigParser, httplib
+import logging, socket, sys, time, xmlrpclib, ConfigParser, httplib
class CobaltComponentError(Exception):
'''This error signals component connection errors'''
@@ -123,7 +123,10 @@ class OSSafeTransport(xmlrpclib.Transport):
class SafeProxy:
'''Wrapper for proxy'''
_cfile = ConfigParser.ConfigParser()
- _cfpath = '/etc/bcfg2.conf'
+ if '-C' in sys.argv:
+ _cfpath = sys.argv[sys.argv.index('-C') + 1]
+ else:
+ _cfpath = '/etc/bcfg2.conf'
_cfile.read([_cfpath])
try:
_components = _cfile._sections['components']