@@ -269,8 +269,8 @@ def _do_request(
269269 f"{ method } { path } HTTP/1.1\r \n " +
270270 "Host: api.local\r \n " +
271271 "Connection: close\r \n " +
272- f"Authorization: Basic { auth_str } \r \n " +
273- '\r \n ' .join (headers )
272+ f"Authorization: Basic { auth_str } " +
273+ '\r \n ' .join (headers ) + " \r \n "
274274 )
275275 del auth_str
276276 collect ()
@@ -382,7 +382,7 @@ def get_status(self) -> GameStatus:
382382 if self .v :
383383 print ("Getting status..." )
384384 resp = self .request ('GET' , '/status' ,
385- headers = ['User-Agent: CircuitPython, dude! ' ]
385+ headers = ['User-Agent: CircuitPythonDude ' ]
386386 )
387387 resp_json = loads (resp [1 ])
388388 if self .v :
@@ -397,7 +397,7 @@ def post(self, point: DataPoint) -> bool:
397397 '/data' ,
398398 point .dumps (),
399399 content_type = 'application/json' ,
400- headers = ['User-Agent: CircuitPython, dude! ' ]
400+ headers = ['User-Agent: CircuitPythonDude ' ]
401401 ).code == 201
402402
403403 def email (self , msg : Email ) -> bool :
@@ -408,7 +408,7 @@ def email(self, msg: Email) -> bool:
408408 '/email' ,
409409 msg .dumps (),
410410 content_type = 'application/json' ,
411- headers = ['User-Agent: CircuitPython, dude! ' ]
411+ headers = ['User-Agent: CircuitPythonDude ' ]
412412 ).code == 201
413413
414414 def code_update (self , reset = True ) -> bool :
@@ -425,7 +425,7 @@ def code_update(self, reset=True) -> bool:
425425 response = self .request (
426426 'GET' ,
427427 '/update' ,
428- headers = ['User-Agent: CircuitPython, dude! ' ]
428+ headers = ['User-Agent: CircuitPythonDude ' ]
429429 )
430430 if response .code != 200 :
431431 if self .v :
0 commit comments