summaryrefslogtreecommitdiff
path: root/Run
diff options
context:
space:
mode:
Diffstat (limited to 'Run')
-rwxr-xr-xRun/Que/client.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/Run/Que/client.py b/Run/Que/client.py
index e272d6a..cd24618 100755
--- a/Run/Que/client.py
+++ b/Run/Que/client.py
@@ -5,6 +5,7 @@ simple client for que.run
import argparse
import configparser
+import http.client
import os
import subprocess
import sys
@@ -110,8 +111,8 @@ def get_args():
if __name__ == "__main__":
+ args = get_args()
try:
- args = get_args()
if args.infile:
send(args)
else:
@@ -121,3 +122,10 @@ if __name__ == "__main__":
except urllib.error.HTTPError as e:
print(e)
sys.exit(1)
+ except http.client.RemoteDisconnected as e:
+ print("disconnected... retrying in 5 seconds")
+ time.sleep(5)
+ if args.infile:
+ send(args)
+ else:
+ recv(args)