client: fix image url parsing

This commit is contained in:
2021-03-25 17:56:21 +01:00
parent b37aa33131
commit f15ff38f69
7 changed files with 24 additions and 60 deletions

View File

@@ -46,45 +46,4 @@ try:
except Exception as e:
print("[ABRT] Internal error: " + str(e), file=sys.stderr)
logging.debug("Internal error", exc_info=e)
sys.exit(70)
# import socket
#
# # Get hostname and address
# hostname = socket.gethostname()
# address = socket.gethostbyname(hostname)
#
# # socket heeft een listening and accept method
#
# SERVER = "127.0.0.1" # dynamisch fixen in project
# PORT = 5055
# server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#
# ADDR = (SERVER, PORT) # hier wordt de socket gebonden aan mijn IP adres, dit moet wel anders
# server.bind(ADDR) # in het project gebeuren
#
# HEADER = 64 # maximum size messages
# FORMAT = 'utf-8'
# DISCONNECT_MESSAGE = "DISCONNECT!" # special message for disconnecting client and server
#
#
# # function for starting server
# def start():
# pass
# server.listen()
# while True: # infinite loop in which server accept incoming connections, we want to run it forever
# conn, addr = server.accept() # Server blocks untill a client connects
# print("new connection: ", addr[0], " connected.")
# connected = True
# while connected: # while client is connected, we want to recieve messages
# msg = conn.recv(HEADER).decode(
# FORMAT).rstrip() # Argument is maximum size of msg (in project look into details of accp), decode is for converting bytes to strings, rstrip is for stripping messages for special hidden characters
# print("message: ", msg)
# if msg == DISCONNECT_MESSAGE:
# connected = False
# print("close connection ", addr[0], " disconnected.")
# conn.close()
#
#
# print("server is starting ... ")
# start()
sys.exit(70)