summaryrefslogtreecommitdiff
path: root/source_control
diff options
context:
space:
mode:
authorAdrian Likins <alikins@redhat.com>2016-07-28 16:59:22 -0400
committerBrian Coca <bcoca@users.noreply.github.com>2016-07-28 16:59:22 -0400
commit9006c8018db094eb63818f0b083b2dccce668d97 (patch)
treeeeff3b96a1b67c895b2411dce1866bfd5affde6a /source_control
parentd72a394f0bd2ea98fb08e220474e7f2657358044 (diff)
downloadansible-modules-extras-9006c8018db094eb63818f0b083b2dccce668d97.tar.gz
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.
Diffstat (limited to 'source_control')
-rw-r--r--source_control/github_key.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/source_control/github_key.py b/source_control/github_key.py
index 8f8279e6..3b887b85 100644
--- a/source_control/github_key.py
+++ b/source_control/github_key.py
@@ -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):