diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-12-31 13:58:01 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-12-31 13:58:01 +0000 |
commit | 9bdf6993448cd6a3c50fee7c38c833ebe558ad58 (patch) | |
tree | 647d35880f63f9ad0598b0b7c265de2634b66cea /src/lib/Component.py | |
parent | ef9079e5e09a77cacde3ef7f3449cb0f23f4cc3b (diff) | |
download | bcfg2-9bdf6993448cd6a3c50fee7c38c833ebe558ad58.tar.gz bcfg2-9bdf6993448cd6a3c50fee7c38c833ebe558ad58.tar.bz2 bcfg2-9bdf6993448cd6a3c50fee7c38c833ebe558ad58.zip |
Clean up location handling in Component
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4152 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Component.py')
-rw-r--r-- | src/lib/Component.py | 9 |
1 files 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 |