Revision caad16e2 lib/utils.py
b/lib/utils.py | ||
---|---|---|
823 | 823 |
return success |
824 | 824 |
|
825 | 825 |
|
826 |
def OwnIpAddress(address): |
|
827 |
"""Check if the current host has the the given IP address. |
|
828 |
|
|
829 |
Currently this is done by tcp-pinging the address from the loopback |
|
830 |
address. |
|
831 |
|
|
832 |
@type address: string |
|
833 |
@param address: the addres to check |
|
834 |
@rtype: bool |
|
835 |
|
|
836 |
""" |
|
837 |
return TcpPing(address, constants.DEFAULT_NODED_PORT, |
|
838 |
source=constants.LOCALHOST_IP_ADDRESS) |
|
839 |
|
|
840 |
|
|
826 | 841 |
def ListVisibleFiles(path): |
827 | 842 |
"""Returns a list of all visible files in a directory. |
828 | 843 |
|
Also available in: Unified diff