mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-05 16:18:02 +01:00
Merge pull request #2 from johnyf/master
add authorization to header only if specified by user
This commit is contained in:
@@ -127,7 +127,8 @@ def retrieve_data(args, template, query_args=None, single_request=False):
|
||||
}.items() + query_args.items()))
|
||||
|
||||
request = urllib2.Request(template + '?' + querystring)
|
||||
request.add_header('Authorization', 'Basic ' + auth)
|
||||
if auth is not None:
|
||||
request.add_header('Authorization', 'Basic ' + auth)
|
||||
r = urllib2.urlopen(request)
|
||||
|
||||
errors = []
|
||||
|
||||
Reference in New Issue
Block a user