make get_my_ip return 127.0.0.1 for testing

This commit is contained in:
andy
2010年06月11日 10:08:13 +01:00
parent b07af87974
commit 716673f9bb

View File

@@ -102,6 +102,8 @@ def last_octet(address):
def get_my_ip():
''' returns the actual ip of the local machine.
'''
if getattr(FLAGS, 'fake_tests', None):
return '127.0.0.1'
csock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
csock.connect(('www.google.com', 80))
(addr, port) = csock.getsockname()
Reference in New Issue
openstack/nova
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.