Changeset - 3ee8c6d13684
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 9 years ago 2016-06-12 00:27:07
drewp@bigasterisk.com
rm pointless log
Ignore-this: ba166bbd90b844370e8fa8967b32d28a
1 file changed with 1 insertions and 2 deletions:
0 comments (0 inline, 0 general)
light9/rdfdb/patchsender.py
Show inline comments
 
@@ -100,22 +100,21 @@ def sendPatch(putUri, patch, **kw):
 
    body = patch.makeJsonRepr(kw)
 
    jsonTime = time.time() - t1
 
    intro = body[:200]
 
    if len(body) > 200:
 
        intro = intro + "..."
 
    log.debug("send body (rendered %.1fkB in %.1fms): %s", len(body) / 1024, jsonTime * 1000, intro)
 
    sendTime = time.time()
 
    def putDone(done):
 
        if not str(done.code).startswith('2'):
 
            raise ValueError("sendPatch request failed %s: %s" %
 
                             (done.code, done.body))
 
        dt = 1000 * (time.time() - sendTime)
 
        log.debug("sendPatch to %s took %sms, response: %r" %
 
                  (putUri, dt, done.body))
 
        log.debug("sendPatch to %s took %.1fms" % (putUri, dt))
 
        return done
 

	
 
    return cyclone.httpclient.fetch(
 
        url=putUri,
 
        method='PUT',
 
        headers={'Content-Type': ['application/json']},
 
        postdata=body,
 
        ).addCallback(putDone)
0 comments (0 inline, 0 general)