Permalink
Browse files

Fixed a bug in error_page_404() method in which it wanted five args, …

…but was only getting four.

I have no idea why this keeps creeping back in.

Signed-off-by: The Doctor <drwho@virtadpt.net>
  • Loading branch information...
1 parent 1bb4563 commit a9beca538a9b9a821ae59f7e94be9836281c4e92 @virtadpt virtadpt committed Feb 10, 2013
Showing with 2 additions and 5 deletions.
  1. +2 −5 captive_portal/captive_portal.py
@@ -54,14 +54,12 @@
import struct
import subprocess
-
-# Need this for the 404 method
+# Need this for the 404 method.
def get_ip_address(interface):
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(fcntl.ioctl(sock.fileno(), 0x8915,
struct.pack('256s', interface[:15]))[20:24])
-
# The CaptivePortalDetector class implements a fix for an undocumented bit of
# fail in Apple iOS. iProducts attempt to access a particular file hidden in
# the Apple Computer website. If it can't find it, iOS forces the user to try
@@ -91,7 +89,6 @@ def success_html(self):
return success
success_html.exposed = True
-
# Dummy class that has to exist to create a durectory URI hierarchy.
class Library(object):
@@ -180,7 +177,7 @@ def whitelist(self, accepted=None):
# calling self.index() directly) but the stable's fresh out of ponies.
# We don't use any of the arguments passed to this method so I reference
# a few of them in debug mode.
- def error_page_404(self, status, message, traceback, version):
+ def error_page_404(self, status, message, traceback):
# Extract the client's IP address from the client headers.
clientip = cherrypy.request.headers['Remote-Addr']
logging.debug("Client's IP address: %s", clientip)

0 comments on commit a9beca5

Please sign in to comment.