No bare except

This commit is contained in:
Matt Martz 2017-11-23 09:49:26 -06:00
parent 5c061da8e0
commit f70cc86222
1 changed files with 2 additions and 2 deletions

View File

@ -1184,7 +1184,7 @@ class Speedtest(object):
d = distance(self.lat_lon, d = distance(self.lat_lon,
(float(attrib.get('lat')), (float(attrib.get('lat')),
float(attrib.get('lon')))) float(attrib.get('lon'))))
except: except Exception:
continue continue
attrib['d'] = d attrib['d'] = d
@ -1234,7 +1234,7 @@ class Speedtest(object):
f = self._opener.open( f = self._opener.open(
'%s/speedtest/upload.%s' % (url, ext) '%s/speedtest/upload.%s' % (url, ext)
) )
except: except Exception:
pass pass
else: else:
data = f.read().strip().decode() data = f.read().strip().decode()