def __init__(self, host, port, username, password):
    authpair = ('%s:%s' % (username, password))
    self.authhdr = ('Basic %s' % base64.b64encode(authpair))
    self.conn = httplib.HTTPConnection(host, port, False, 30)
def __init__(self, host, port, username, password):
    authpair = ('%s:%s' % (username, password))
    self.authhdr = ('Basic %s' % base64.b64encode(authpair))
    self.conn = httplib.HTTPConnection(host, port, False, 30)