Skip to content

Commit 5719a94

Browse files
committed
Merge pull request josegonzalez#2 from johnyf/master
add authorization to header only if specified by user
2 parents 5b23fa6 + deb1955 commit 5719a94

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

bin/github-backup

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ def retrieve_data(args, template, query_args=None, single_request=False):
127127
}.items() + query_args.items()))
128128

129129
request = urllib2.Request(template + '?' + querystring)
130-
request.add_header('Authorization', 'Basic ' + auth)
130+
if auth is not None:
131+
request.add_header('Authorization', 'Basic ' + auth)
131132
r = urllib2.urlopen(request)
132133

133134
errors = []

0 commit comments

Comments
 (0)