Revert pypofile try block move
Config file getting is allowed to fail. I didn't realize that it would not just use the default instead of excepting and getting caught. Sorry for that.
This commit is contained in:
parent
38fe253438
commit
4287ac1c70
1 changed files with 4 additions and 4 deletions
|
@ -61,11 +61,11 @@ class PypoFile(Thread):
|
||||||
self.logger.info("copying from %s to local cache %s" % (src, dst))
|
self.logger.info("copying from %s to local cache %s" % (src, dst))
|
||||||
|
|
||||||
CONFIG_SECTION = "general"
|
CONFIG_SECTION = "general"
|
||||||
|
username = self._config.get(CONFIG_SECTION, 'api_key')
|
||||||
|
baseurl = self._config.get(CONFIG_SECTION, 'base_url')
|
||||||
|
port = self._config.get(CONFIG_SECTION, 'base_port', 80)
|
||||||
|
protocol = self._config.get(CONFIG_SECTION, 'protocol', str(("http", "https")[int(port) == 443]))
|
||||||
try:
|
try:
|
||||||
username = self._config.get(CONFIG_SECTION, 'api_key')
|
|
||||||
baseurl = self._config.get(CONFIG_SECTION, 'base_url')
|
|
||||||
port = self._config.get(CONFIG_SECTION, 'base_port', 80)
|
|
||||||
protocol = self._config.get(CONFIG_SECTION, 'protocol', str(("http", "https")[int(port) == 443]))
|
|
||||||
|
|
||||||
host = [protocol, baseurl, port]
|
host = [protocol, baseurl, port]
|
||||||
url = "%s://%s:%s/rest/media/%s/download" % (host[0],
|
url = "%s://%s:%s/rest/media/%s/download" % (host[0],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue