import socket


def check_up(address, port):
    """
    Find out if a port at an address is occupied
    """
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    result = sock.connect_ex((address, port))
    sock.close()
    if result == 0:
        ans = True
    else:
        ans = False
    return ans