encode hostname as unicode before adding as header

This commit is contained in:
Alan Hamlett 2016-03-06 12:34:59 -08:00
parent b6bd75a0e8
commit 12e4f56d4b

View file

@ -341,7 +341,7 @@ def send_heartbeat(project=None, branch=None, hostname=None, stats={}, key=None,
'Authorization': auth, 'Authorization': auth,
} }
if hostname: if hostname:
headers['X-Machine-Name'] = hostname headers['X-Machine-Name'] = u(hostname)
proxies = {} proxies = {}
if proxy: if proxy:
proxies['https'] = proxy proxies['https'] = proxy