Преглед изворни кода

/providers: used wrong sort key

Helge Jung пре 9 година
родитељ
комит
67c034eda9
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      ffstatus/server.py

+ 1 - 1
ffstatus/server.py

@@ -540,7 +540,7 @@ class BatcaveHttpRequestHandler(BaseHTTPRequestHandler):
 			self.wfile.write('<!DOCTYPE html><html><head><title>BATCAVE - PROVIDERS</title></head><body>\n')
 			self.wfile.write('<table border="2"><thead><tr><th>Count</th><th>Percentage</th><th>Name</th></tr></thead><tbody>\n')
 
-			for isp in sorted(isps, key=lambda x: isps[isp], reverse=True):
+			for isp in sorted(isps, key=lambda x: isps[x], reverse=True):
 				self.wfile.write('<tr><td>{0}</td><td>{1:.1f}%</td><td>{2}</td></tr>\n'.format(isps[isp], isps[isp]*100.0/isps_sum, isp))
 
 			self.wfile.write('</tbody></table>\n')