'Getter method which returns the hostname:port, or empty string
if no hostname is present.'

@property
def netloc(self):

    if (not self.hostname):
        return ''
    elif getattr(self, 'port', None):
        return ((self.hostname + ':') + str(self.port))
    return self.hostname
