Make pypo media downloader port aware
This is needed if the base port is not 80 like in the vagrant setup.
This commit is contained in:
parent
8ddc5867ac
commit
0e8d0868e8
1 changed files with 3 additions and 1 deletions
|
@ -66,7 +66,9 @@ class PypoFile(Thread):
|
|||
CONFIG_SECTION = "general"
|
||||
username = self._config.get(CONFIG_SECTION, 'api_key')
|
||||
host = self._config.get(CONFIG_SECTION, 'base_url')
|
||||
url = "http://%s/rest/media/%s/download" % (host, media_item["id"])
|
||||
port = self._config.get(CONFIG_SECTION, 'base_port', 80)
|
||||
url = "http://%s:%s/rest/media/%s/download" % (host, port, media_item["id"])
|
||||
self.logger.error(url)
|
||||
with open(dst, "wb") as handle:
|
||||
response = requests.get(url, auth=requests.auth.HTTPBasicAuth(username, ''), stream=True, verify=False)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue