pep8speaks caught a bare except. I have seen this issue with urllib appear in the past and one way around it is to remove and use the python 3 import only since python 2 won't be/isn't supported anymore. If that solution isn't the most robust, we just add ImportError after the except statement:
try:
# Python 3
# Read the background cache version
version_file = urllib.request.urlopen(self.cache_url + 'VERSION')
sbet_file = urllib.request.urlopen(self.cache_url + cache_file)
except ImportError:
# Python 2
# Read the background cache version
version_file = urllib.urlopen(self.cache_url + 'VERSION')
sbet_file = urllib.urlopen(self.cache_url + cache_file)
pep8speakscaught a bare except. I have seen this issue withurllibappear in the past and one way around it is to remove and use the python 3 import only since python 2 won't be/isn't supported anymore. If that solution isn't the most robust, we just addImportErrorafter the except statement: