Skip to content

Commit

Permalink
Fix import in get_my_ip. Fix #1771 (#1772)
Browse files Browse the repository at this point in the history
* fix 1771

* fix import
  • Loading branch information
darindf authored and menshikh-iv committed Dec 11, 2017
1 parent 11c44d2 commit 056ec00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gensim/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,9 @@ def get_my_ip():
"""
import socket
try:
import Pyro4
from Pyro4.naming import locateNS
# we know the nameserver must exist, so use it as our anchor point
ns = Pyro4.naming.locateNS()
ns = locateNS()
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect((ns._pyroUri.host, ns._pyroUri.port))
result, port = s.getsockname()
Expand Down

0 comments on commit 056ec00

Please sign in to comment.