daemon/core/broker.py
def writeservers(self):
        ''' Write the server list to a text file in the session directory upon
        startup: /tmp/pycore.nnnnn/servers
        '''
        filename = os.path.join(self.session.sessiondir, "servers")
        try:
            f = open(filename, "w")
            master = self.session_id_master
            if master is None:
                master = self.session.sessionid
            f.write("master=%s\n" % master)
            self.servers_lock.acquire()
            for name in sorted(self.servers.keys()):
                if name == "localhost":
                    continue
                (host, port, sock) = self.servers[name]
                try:
                    (lhost, lport) = sock.getsockname()
                except:
                    lhost, lport = None, None
                f.write("%s %s %s %s %s\n" % (name, host, port, lhost, lport))
            f.close()
        except Exception, e:
            self.session.warn("Error writing server list to the file: %s\n%s" \
                        % (filename, e))
        finally:
            self.servers_lock.release()
 Write the server list to a text file in the session directory upon
        startup: /tmp/pycore.nnnnn/servers
        
Write the server list to a text file in the session directory upon
startup: /tmp/pycore.nnnnn/servers
Write the server list to a text file in the session directory upon startup : / tmp / pycore . nnnnn / servers
def writeservers(self):
        filename = os.path.join(self.session.sessiondir, "servers")
        try:
            f = open(filename, "w")
            master = self.session_id_master
            if master is None:
                master = self.session.sessionid
            f.write("master=%s\n" % master)
            self.servers_lock.acquire()
            for name in sorted(self.servers.keys()):
                if name == "localhost":
                    continue
                (host, port, sock) = self.servers[name]
                try:
                    (lhost, lport) = sock.getsockname()
                except:
                    lhost, lport = None, None
                f.write("%s %s %s %s %s\n" % (name, host, port, lhost, lport))
            f.close()
        except Exception, e:
            self.session.warn("Error writing server list to the file: %s\n%s" \
                        % (filename, e))
        finally:
            self.servers_lock.release()
def writeservers ( self ) : filename = os . path . join ( self . session . sessiondir , "servers" ) try : f = open ( filename , "w" ) master = self . session_id_master if master is None : master = self . session . sessionid f . write ( "master=%s\n" % master ) self . servers_lock . acquire ( ) for name in sorted ( self . servers . keys ( ) ) : if name == "localhost" : continue ( host , port , sock ) = self . servers [ name ] try : ( lhost , lport ) = sock . getsockname ( ) except : lhost , lport = None , None f . write ( "%s %s %s %s %s\n" % ( name , host , port , lhost , lport ) ) f . close ( ) except Exception , e : self . session . warn ( "Error writing server list to the file: %s\n%s" % ( filename , e ) ) finally : self . servers_lock . release ( )
Write the server list to a text file in the session directory upon
startup: /tmp/pycore.nnnnn/servers
Write the server list to a text file in the session directory upon startup : / tmp / pycore . nnnnn / servers
''' Write the server list to a text file in the session directory upon
        startup: /tmp/pycore.nnnnn/servers
        '''
self