mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
let port be optional
This commit is contained in:
parent
7f143bcdf9
commit
71dbd10b39
@ -40,7 +40,10 @@ class Itunes(object):
|
|||||||
@property
|
@property
|
||||||
def _base_url(self):
|
def _base_url(self):
|
||||||
""" Returns the base url for endpoints. """
|
""" Returns the base url for endpoints. """
|
||||||
return self.host + ":" + str(self.port)
|
if self.port:
|
||||||
|
return self.host + ":" + str(self.port)
|
||||||
|
else:
|
||||||
|
return self.host
|
||||||
|
|
||||||
def _request(self, method, path, params=None):
|
def _request(self, method, path, params=None):
|
||||||
""" Makes the actual request and returns the parsed response. """
|
""" Makes the actual request and returns the parsed response. """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user