[IMP] send an already pushed document. handle exceptions differently for the client or internal call

This commit is contained in:
@
2012-11-23 14:29:32 +01:00
committed by Anna Janiszewska
parent 2d462a75c4
commit 4328c604f3
3 changed files with 125 additions and 45 deletions

View File

@@ -155,10 +155,15 @@ class Pingen(object):
:param int/str color: type of print, 0 = B/W, 1 = Color
:return: id of the post on pingen.com
"""
data = {
'speed': speed,
'color': color,
}
response = self._send(
requests.post,
'document/send',
params={'id': document_id})
params={'id': document_id},
data={'data': json.dumps(data)})
return response.json['id']