From 6ed3a23c622bb968a6effcd7905286eea8fcde94 Mon Sep 17 00:00:00 2001 From: Zooko O'Whielacronx Date: Thu, 16 Aug 2007 16:01:01 -0700 Subject: [PATCH] incomplete version of tahoe-put.py It doesn't exit properly afterward, and it might not do the best things with non-success responses from the server. (See tahoe-put-web2ish.py for an example of better response handling.) --- .../scripts/{tahoe_put-socketish.py => tahoe_put.py} | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) rename src/allmydata/scripts/{tahoe_put-socketish.py => tahoe_put.py} (88%) diff --git a/src/allmydata/scripts/tahoe_put-socketish.py b/src/allmydata/scripts/tahoe_put.py similarity index 88% rename from src/allmydata/scripts/tahoe_put-socketish.py rename to src/allmydata/scripts/tahoe_put.py index 7c912d76..49009d95 100644 --- a/src/allmydata/scripts/tahoe_put-socketish.py +++ b/src/allmydata/scripts/tahoe_put.py @@ -33,9 +33,8 @@ def put(serverurl, vdrive, vdrive_fname, local_fname, verbosity): while data: try: sent = so.send(data) - print "XXXXXXXX I just sent %s" % (data[:sent],) except Exception, le: - print "BOOOOO le: %r" % (le,) + print "got socket error: %s" % (le,) return -1 if sent == len(data): @@ -46,14 +45,14 @@ def put(serverurl, vdrive, vdrive_fname, local_fname, verbosity): respbuf = [] data = so.recv(CHUNKSIZE) while data: - print "WHEEEEE okay now we've got some more data: %r" % (data,) + print "debuggery 1 okay now we've got some more data: %r" % (data,) respbuf.append(data) data = so.recv(CHUNKSIZE) so.shutdown(socket.SHUT_WR) data = so.recv(CHUNKSIZE) while data: - print "WHEEEEE 22222 okay now we've got some more data: %r" % (data,) + print "debuggery 2 okay now we've got some more data: %r" % (data,) respbuf.append(data) data = so.recv(CHUNKSIZE) -- 2.45.2