Use py2.4 compat string formatting in github_key (#2633)

Replace the use of python 2.6+ string .format() method
use with the python 2.4 compatible '%s' formatting to
make the github_key module py2.4 compatible.
pull/18777/head
Adrian Likins 8 years ago committed by Matt Clay
parent fdb8d11958
commit 292d788d09

@ -99,7 +99,7 @@ class GitHubSession(object):
def request(self, method, url, data=None):
headers = {
'Authorization': 'token {}'.format(self.token),
'Authorization': 'token %s' % self.token,
'Content-Type': 'application/json',
'Accept': 'application/vnd.github.v3+json',
}
@ -147,7 +147,7 @@ def delete_keys(session, to_delete, check_mode):
return
for key in to_delete:
session.request('DELETE', API_BASE + '/user/keys/{[id]}'.format(key))
session.request('DELETE', API_BASE + '/user/keys/%s' % key[id])
def ensure_key_absent(session, name, check_mode):

Loading…
Cancel
Save