summaryrefslogtreecommitdiff
path: root/Run/Que/client.py
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-04-11 00:39:03 -0700
committerBen Sima <ben@bsima.me>2020-04-11 00:39:03 -0700
commit20213be7232fd858130f8b4b468be6ac2b532741 (patch)
tree34a34abb4818e151dc9aecbdbdd493842e94811a /Run/Que/client.py
parentdd7c95b064ce156c23c1312ef821c0965b900d48 (diff)
Fix a bug in que --serve
Diffstat (limited to 'Run/Que/client.py')
-rwxr-xr-xRun/Que/client.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Run/Que/client.py b/Run/Que/client.py
index ed128b8..e272d6a 100755
--- a/Run/Que/client.py
+++ b/Run/Que/client.py
@@ -35,11 +35,10 @@ def send(args):
req.add_header("Authorization", key)
if args.serve:
while not time.sleep(1):
- with request.urlopen(req, data=data, timeout=MAX_TIMEOUT) as req:
- pass
+ request.urlopen(req, data=data, timeout=MAX_TIMEOUT)
+
else:
- with request.urlopen(req, data=data, timeout=MAX_TIMEOUT) as req:
- pass
+ request.urlopen(req, data=data, timeout=MAX_TIMEOUT)
def recv(args):