[yt-svn] commit/yt: hegan: Mac localhost fix to rockstar

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Jan 10 06:37:30 PST 2014


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/a7c959d7d3cd/
Changeset:   a7c959d7d3cd
Branch:      yt-3.0
User:        hegan
Date:        2014-01-08 22:15:47
Summary:     Mac localhost fix to rockstar
Affected #:  1 file

diff -r b14aeeb32c24da11e8183514af80f14e8c5b5a55 -r a7c959d7d3cd9cfb8bb02a2becb01657e49b0d58 yt/analysis_modules/halo_finding/rockstar/rockstar.py
--- a/yt/analysis_modules/halo_finding/rockstar/rockstar.py
+++ b/yt/analysis_modules/halo_finding/rockstar/rockstar.py
@@ -264,7 +264,14 @@
 
     def _get_hosts(self):
         if self.comm.rank == 0 or self.comm.size == 1:
-            server_address = socket.gethostname()
+            
+            #Temporary mac hostname fix
+            try:
+                server_address = socket.gethostname()
+                socket.gethostbyname(server_address)
+            except socket.gaierror:
+                server_address = "localhost"
+
             sock = socket.socket()
             sock.bind(('', 0))
             port = sock.getsockname()[-1]

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list