New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Library Bug] Bug from #99: methods with join call broken #101
Comments
Thanks for letting me know! Figures something like this should happen. I'll just program my own join method that works on all OSes. Should be fixed in the next half hour. |
from posixpath import join as urljoin This should work exactly like |
Thank you! I've monkeypatched with def hacky_join(a, b):
from urllib.parse import urljoin
return urljoin(a + '/' if not a.endswith('/') else '', b)
homeassistant_api.rawclient.join = hacky_join
homeassistant_api._async.asyncclient.join = hacky_join |
I guess that works! |
Gimme five minutes and I can have a new PR |
New version out! Update to |
Describe the bug
Methods like
get_state
,set_state
,trigger_service
&fire_event
are broken since #99To Reproduce
This simple code snippet fails:
Stack trace:
Reason
urljoin works not like path join:
urljoin('xyz', 'abc') - > 'abc'
urljoin('xyz/', 'abc') - > 'xyz/abc'
The text was updated successfully, but these errors were encountered: