def packup_host(d):
    """
        d = {'hostname': 'www.baidu.com', 'port': ''}
        packup_host(d)
        d = {'hostname': 'www.baidu.com', 'port': '443'}
        packup_host(d)
    """
    if d['port'] == '':
        host = d['hostname']
    else:
        host = d['hostname'] + ':' + d['port']
    return host
