[sagenb] 46/179: Change "host" back to "interface"

felix salfelder felix-guest at moszumanska.debian.org
Tue May 6 12:05:08 UTC 2014


This is an automated email from the git hooks/post-receive script.

felix-guest pushed a commit to branch master
in repository sagenb.

commit 4ef09d84d1bdbe7d3fd4172e9b9aafd126e2c427
Author: John H. Palmieri <palmieri at math.washington.edu>
Date:   Thu Dec 6 20:31:32 2012 -0800

    Change "host" back to "interface"
---
 sagenb/misc/misc.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sagenb/misc/misc.py b/sagenb/misc/misc.py
index f0b6ad0..b40ce43 100644
--- a/sagenb/misc/misc.py
+++ b/sagenb/misc/misc.py
@@ -86,15 +86,15 @@ def print_open_msg(address, port, secure=False, path=""):
     print '*'*n
 
 
-def find_next_available_port(host, start, max_tries=100, verbose=False):
+def find_next_available_port(interface, start, max_tries=100, verbose=False):
     """
-    Find the next available port on a given host, that is, a port for
+    Find the next available port at a given interface, that is, a port for
     which a current connection attempt returns a 'Connection refused'
     error message.  If no port is found, raise a RuntimeError exception.
 
     INPUT:
 
-    - ``host`` - address to check
+    - ``interface`` - address to check
 
     - ``start`` - an int; the starting port number for the scan
 
@@ -118,7 +118,7 @@ def find_next_available_port(host, start, max_tries=100, verbose=False):
         try:
             alarm(1)
             s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-            s.connect((host, port))
+            s.connect((interface, port))
         except socket.error, msg:
             if msg[1] == 'Connection refused':
                 if verbose: print "Using port = %s"%port

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagenb.git



More information about the debian-science-commits mailing list