Merge pull request #183 from wzcboss/master

Remove ";" in python code
This commit is contained in:
Baohua Yang 2017-07-25 10:38:38 +08:00 committed by GitHub
commit 9686afcf6f

View File

@ -62,7 +62,7 @@ class HandlerClass(SimpleHTTPRequestHandler):
del request[addr_pair] del request[addr_pair]
request[addr_pair]=[num,ts] request[addr_pair]=[num,ts]
file=open("index.html", "w") file=open("index.html", "w")
file.write("<!DOCTYPE html> <html> <body><center><h1><font color=\"blue\" face=\"Georgia, Arial\" size=8><em>HA</em></font> Webpage Visit Results</h1></center>"); file.write("<!DOCTYPE html> <html> <body><center><h1><font color=\"blue\" face=\"Georgia, Arial\" size=8><em>HA</em></font> Webpage Visit Results</h1></center>")
for pair in request: for pair in request:
if pair[0] == host: if pair[0] == host:
guest = "LOCAL: "+pair[0] guest = "LOCAL: "+pair[0]
@ -72,7 +72,7 @@ class HandlerClass(SimpleHTTPRequestHandler):
file.write("<p style=\"font-size:150%\" >#"+ str(request[pair][1]) +": <font color=\"red\">"+str(request[pair][0])+ "</font> requests " + "from &lt<font color=\"blue\">"+guest+"</font>&gt to WebServer &lt<font color=\"blue\">"+pair[1]+"</font>&gt</p>") file.write("<p style=\"font-size:150%\" >#"+ str(request[pair][1]) +": <font color=\"red\">"+str(request[pair][0])+ "</font> requests " + "from &lt<font color=\"blue\">"+guest+"</font>&gt to WebServer &lt<font color=\"blue\">"+pair[1]+"</font>&gt</p>")
else: else:
file.write("<p style=\"font-size:150%\" >#"+ str(request[pair][1]) +": <font color=\"maroon\">"+str(request[pair][0])+ "</font> requests " + "from &lt<font color=\"navy\">"+guest+"</font>&gt to WebServer &lt<font color=\"navy\">"+pair[1]+"</font>&gt</p>") file.write("<p style=\"font-size:150%\" >#"+ str(request[pair][1]) +": <font color=\"maroon\">"+str(request[pair][0])+ "</font> requests " + "from &lt<font color=\"navy\">"+guest+"</font>&gt to WebServer &lt<font color=\"navy\">"+pair[1]+"</font>&gt</p>")
file.write("</body> </html>"); file.write("</body> </html>")
file.close() file.close()
pickle.dump(request,open("pickle_data.txt","w")) pickle.dump(request,open("pickle_data.txt","w"))