From 9bdf6993448cd6a3c50fee7c38c833ebe558ad58 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Mon, 31 Dec 2007 13:58:01 +0000 Subject: Clean up location handling in Component git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4152 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Component.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/lib/Component.py b/src/lib/Component.py index ec5e9d41d..6465f03a0 100644 --- a/src/lib/Component.py +++ b/src/lib/Component.py @@ -156,11 +156,8 @@ class Component(TLSServer, opts = Bcfg2.Options.OptionParser(options) opts.parse([]) location = opts['location'] - if opts['static']: - location = urlparse.urlparse(location)[1].split(':') - location = (location[0], int(location[1])) - - print opts + uparsed = urlparse.urlparse(location)[1].split(':') + sock_loc = (uparsed[0], int(uparsed[1])) if not opts['key']: print "No key specified in '%s'" % setup['configfile'] @@ -170,7 +167,7 @@ class Component(TLSServer, self.password = opts['passwd'] try: - TLSServer.__init__(self, location, keyfile, CobaltXMLRPCRequestHandler) + TLSServer.__init__(self, sock_loc, keyfile, CobaltXMLRPCRequestHandler) except socket.error: self.logger.error("Failed to bind to socket") raise ComponentInitError -- cgit v1.2.3-1-g7c22