projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new --force option for xxx-delete commands in sol005 client
[osm/osmclient.git]
/
osmclient
/
sol005
/
package.py
diff --git
a/osmclient/sol005/package.py
b/osmclient/sol005/package.py
index
9fd734a
..
b2fe035
100644
(file)
--- a/
osmclient/sol005/package.py
+++ b/
osmclient/sol005/package.py
@@
-26,6
+26,7
@@
import yaml
from osmclient.common.exceptions import ClientException
from osmclient.common.exceptions import NotFound
from osmclient.common import utils
from osmclient.common.exceptions import ClientException
from osmclient.common.exceptions import NotFound
from osmclient.common import utils
+import json
class Package(object):
class Package(object):
@@
-57,7
+58,9
@@
class Package(object):
http_header = ['{}: {}'.format(key,val)
for (key,val) in headers.items()]
self._http.set_http_header(http_header)
http_header = ['{}: {}'.format(key,val)
for (key,val) in headers.items()]
self._http.set_http_header(http_header)
- resp = self._http.post_cmd(endpoint=endpoint, filename=filename)
+ http_code, resp = self._http.post_cmd(endpoint=endpoint, filename=filename)
+ if resp:
+ resp = json.loads(resp)
#print 'RESP: {}'.format(yaml.safe_dump(resp))
if not resp or 'id' not in resp:
raise ClientException("failed to upload package")
#print 'RESP: {}'.format(yaml.safe_dump(resp))
if not resp or 'id' not in resp:
raise ClientException("failed to upload package")