** Changed in: openlp
Assignee: Ken Roberts (alisonken1) => (unassigned)
--
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1410693
Title:
Code duplication in check_latest_version
Status in OpenLP:
In Progress
Bug description:
check_latest_version in core.utils.__init__.py duplicates code to
download and retry on failure of the version check file. This code is
similar to the code in get_webpage. We could reduce duplication by
using get_webpage
Duplicate code:
retries = 0
while True:
try:
remote_version = str(urllib.request.urlopen(req, None,
timeout=CONNECTION_TIMEOUT).read().decode()).strip()
except ConnectionException:
if retries > CONNECTION_RETRIES:
log.exception('Failed to download the latest OpenLP
version file')
else:
retries += 1
time.sleep(0.1)
continue
break
To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1410693/+subscriptions
_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openlp-core
More help : https://help.launchpad.net/ListHelp