def doUpdate():
    r = None
    while r == None:
        try:
            r = requests.post("http://localhost:8080/connect",
                              json=Conf.getAllversionInformation())
            print("A=", r.json())
        except Exception as err:
            r = None
            print("B=", err)
        time.sleep(5)
 def __init__(self, server="http://localhost:8080/"):
     self._baseUrl=server
     self._id=None
     self._info=Conf.getAllversionInformation()
     self._shell=Shell(self)
def doUpdate():
    r = None
    while r == None:
        try:
            r = requests.post("http://localhost:8080/connect",
                              json=Conf.getAllversionInformation())
            print("A=", r.json())
        except Exception as err:
            r = None
            print("B=", err)
        time.sleep(5)


#doUpdate()

print(Conf.getAllversionInformation())

ip, port = "", 0
with open("host") as f:
    ip, port = f.read().split("\n")[0].split(":")
    print("her", ip, port)

client = Agent("http://" + ip + ":" + str(port) + "/")

while True:
    os.system("git pull")
    try:
        client.connect()
        while True:
            ret = client.wait()
            client.sendResponse(ret)