projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Point dependencies to branch
[osm/osmclient.git]
/
osmclient
/
v1
/
key.py
diff --git
a/osmclient/v1/key.py
b/osmclient/v1/key.py
index
40b27f5
..
4e51b78
100644
(file)
--- a/
osmclient/v1/key.py
+++ b/
osmclient/v1/key.py
@@
-24,18
+24,17
@@
from io import BytesIO
class Key(object):
class Key(object):
-
- def __init__(self,client=None):
- self._client=client
+ def __init__(self, client=None):
+ self._client = client
def list(self):
data = BytesIO()
def list(self):
data = BytesIO()
- curl_cmd
=self._client.get_curl_cmd('v1/api/config/key-pair?deep'
)
- curl_cmd.setopt(pycurl.HTTPGET,1)
+ curl_cmd
= self._client.get_curl_cmd("v1/api/config/key-pair?deep"
)
+ curl_cmd.setopt(pycurl.HTTPGET,
1)
curl_cmd.setopt(pycurl.WRITEFUNCTION, data.write)
curl_cmd.perform()
curl_cmd.close()
resp = json.loads(data.getvalue().decode())
curl_cmd.setopt(pycurl.WRITEFUNCTION, data.write)
curl_cmd.perform()
curl_cmd.close()
resp = json.loads(data.getvalue().decode())
- if
'nsr:key-pair'
in resp:
- return resp[
'nsr:key-pair'
]
+ if
"nsr:key-pair"
in resp:
+ return resp[
"nsr:key-pair"
]
return list()
return list()