No bare except
This commit is contained in:
parent
5c061da8e0
commit
f70cc86222
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue