readylan / webiopi

Automatically exported from code.google.com/p/webiopi
0 stars 0 forks source link

Python client basic authentication broken for Python 3 #123

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
As the title says ...

Problem/discussion/patch is here:

https://groups.google.com/d/msg/webiopi/-GqmiJdPo2g/5AibryoT_A8J

Workaround:

.../python/webiopi/clients/__init__.py

change line 43 from :

self.auth = "Basic " + encodeCredentials(login, password)

to :

self.auth = b'Basic ' + encodeCredentials(login, password)

As Python 2 just ignores the b'something' this patch will not cause problems 
for Python 2 clients.

However, this patch just cures the symptoms for now, maybe the final bugfix is 
better suited in crypto.py or somewhere else.

Andreas

Original issue reported on code.google.com by andreas....@googlemail.com on 24 Oct 2014 at 3:21