(self)
Initialize the server
Initialize the server
Initialize the server
def initialize(self):
        """Initialize the server"""
        try:
            self.httpd = ZarpHTTPServer(('', self.config['port'].value), 
                                                          self.handler)
            self.running = True
            self.httpd.serve()
        except socket.error, KeyboardInterrupt:
            self.running = False
        except PortBoundException:
            util.Error("Port %d is already bound." % self.config['port'].value)
            self.running = False
        except Exception, e:
            util.Error('Error: %s' % e)
            self.running = False
        self.shutdown()
def initialize ( self ) : try : self . httpd = ZarpHTTPServer ( ( '' , self . config [ 'port' ] . value ) , self . handler ) self . running = True self . httpd . serve ( ) except socket . error , KeyboardInterrupt : self . running = False except PortBoundException : util . Error ( "Port %d is already bound." % self . config [ 'port' ] . value ) self . running = False except Exception , e : util . Error ( 'Error: %s' % e ) self . running = False self . shutdown ( )