Cannot correctly pass statusUrl request.
I've been struggling with this for almost a day now and cannot get my head around it. It would be great if I could get some assistance.

I've set up a Python HTTP server for a Relay that controls a light switch. Heres the main HTTP and relay control file:
```
import SocketServer
from BaseHTTPServer import BaseHTTPRequestHandler
import RPi.GPIO as GPIO

def on():
    print "on"
    GPIO.setwarnings(False)
    GPIO.setmode(GPIO.BOARD)
    GPIO.setup(12, GPIO.OUT)
    GPIO.output(12,1)

def off():
    print "off"
    GPIO.setwarnings(False)
    GPIO.setmode(GPIO.BOARD)
    GPIO.setup(12, GPIO.OUT)
    GPIO.output(12,0)
    GPIO.cleanup()

def checkStatus():
    GPIO.setwarnings(False)
    GPIO.setmode(GPIO.BOARD)
    GPIO.setup(12, GPIO.OUT)
    status = GPIO.input(12)
    if status:
        return '1'
    else:
        return '0'

class GetHandler(BaseHTTPRequestHandler):
    def do_GET(self):
        if self.path == '/on':
            on()
            self.send_response(200)
        if self.path == '/off':
            off()
            self.send_response(200)
        if self.path == '/status':
            statusValue = checkStatus()
            self.send_response(200)
            self.end_headers()
            self.wfile.write("% s" % statusValue)
            return

if __name__ == '__main__':
    from BaseHTTPServer import HTTPServer
    server = HTTPServer(("", 8080), GetHandler)
    print 'Starting server, use <Ctrl-C> to stop'
    server.serve_forever()
```

I don't know what I'm doing wrong here. Each time I try and request http://xxx.xxx.x.xxx:8080/status I get this error on HomeBridge:
```
[7/24/2020, 1:31:01 PM] [Switch] Error occurred setting state of switch: socket hang up
[7/24/2020, 1:31:01 PM] [Switch] Error: socket hang up
    at connResetException (internal/errors.js:610:14)
    at Socket.socketOnEnd (_http_client.js:453:23)
    at Socket.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1220:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  code: 'ECONNRESET'
}
```

Your help will be much appreciated :)