Merge pull request #183 from wzcboss/master

Remove ";" in python code
pull/184/head
Baohua Yang 2017-07-25 10:38:38 +08:00 committed by GitHub
commit 9686afcf6f
1 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ class HandlerClass(SimpleHTTPRequestHandler):
del request[addr_pair]
request[addr_pair]=[num,ts]
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:
if pair[0] == host:
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>")
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("</body> </html>");
file.write("</body> </html>")
file.close()
pickle.dump(request,open("pickle_data.txt","w"))