diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-02-14 18:28:26 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-02-14 18:28:26 +0000 |
commit | ad980e36f52bc8313d02e2fd39224bee36c667e1 (patch) | |
tree | 529e9bd389a914d1a740ba6c5bd7a34b4e5179ac /src/sbin/bcfg2-server | |
parent | 6f64e71fc628cf059d0bbd0af5462161e339c393 (diff) | |
download | bcfg2-ad980e36f52bc8313d02e2fd39224bee36c667e1.tar.gz bcfg2-ad980e36f52bc8313d02e2fd39224bee36c667e1.tar.bz2 bcfg2-ad980e36f52bc8313d02e2fd39224bee36c667e1.zip |
resync with cobalt libs
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1730 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin/bcfg2-server')
-rwxr-xr-x | src/sbin/bcfg2-server | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server index a528f1864..dafc8be1e 100755 --- a/src/sbin/bcfg2-server +++ b/src/sbin/bcfg2-server @@ -9,7 +9,7 @@ from xmlrpclib import Fault from lxml.etree import XML, Element, tostring import getopt, logging, os, select, signal, socket, sys -import Bcfg2.Logging, Bcfg2.Server.Component, M2Crypto.SSL +import Bcfg2.Logging, Bcfg2.Server.Component logger = logging.getLogger('bcfg2-server') @@ -110,32 +110,17 @@ class Bcfg2Serv(Bcfg2.Server.Component.Component): famfd = self.Core.fam.fileno() while self.socket not in rsockinfo: if self.shut: - raise M2Crypto.SSL.SSLError + raise socket.error try: rsockinfo = select.select([self.socket, famfd], [], [], 15)[0] except select.error: - raise M2Crypto.SSL.SSLError + continue if famfd in rsockinfo: self.Core.fam.Service() if self.socket in rsockinfo: - # workaround for m2crypto 0.15 bug - self.socket.postConnectionCheck = None return self.socket.accept() - def serve_forever(self): - """Handle one request at a time until doomsday.""" - while not self.shut: - self.handle_request() - - def start_shutdown(self, signum, frame): - '''Shutdown on unexpected signals''' - self.shut = True - - def handle_error(self): - '''Catch error path for clean exit''' - return False - def resolve_client(self, client): if self.setup['client']: return self.setup['client'] @@ -208,7 +193,7 @@ class Bcfg2Serv(Bcfg2.Server.Component.Component): return "<ok/>" if __name__ == '__main__': - Bcfg2.Logging.setup_logging() + Bcfg2.Logging.setup_logging('bcfg2-server') options = { 'v':'verbose', 'd':'debug', |