[Bio] / FigKernelPackages / FIG.py Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIG.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5, Mon Mar 15 23:06:47 2004 UTC revision 1.8, Wed Apr 28 21:59:32 2004 UTC
# Line 5  Line 5 
5  import re  import re
6  import FIG_Config  import FIG_Config
7    
8    import Clearinghouse
9    
10    def get_clearinghouse(url = None):
11        return Clearinghouse.Clearinghouse(url)
12    
13  def get_local_hostname():  def get_local_hostname():
14      #      #
15        # See if there is a FIGdisk/config/hostname file. If there
16        # is, force the hostname to be that.
17        #
18    
19        try:
20            fh = open(os.path.join(FIG_Config.fig_disk, "config", "hostname"))
21            host = fh.readline()
22            return host.strip()
23        except:
24            pass
25    
26        #
27      # First check to see if we our hostname is correct.      # First check to see if we our hostname is correct.
28      #      #
29      # Map it to an IP address, and try to bind to that ip.      # Map it to an IP address, and try to bind to that ip.
# Line 249  Line 266 
266          fh = os.popen("uuidgen", "r")          fh = os.popen("uuidgen", "r")
267    
268          newid = fh.readline()          newid = fh.readline()
269            newid = newid.strip()
270    
271          fh.close()          fh.close()
272    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.8

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3