Build user agent, if not built by the time build_request happens

This commit is contained in:
Matt Martz 2015-12-22 15:53:53 -06:00
parent ff606d0ec1
commit 713860a4b4
1 changed files with 3 additions and 0 deletions

View File

@ -299,6 +299,9 @@ def build_request(url, data=None, headers={}):
"""
if not USER_AGENT:
build_user_agent()
if url[0] == ':':
schemed_url = '%s%s' % (SCHEME, url)
else: