mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-04-15 12:08:06 -04:00
Fixed overly general exception in Python code.
Pylint discovered that I was raising Exception, which was overly general. I didn't mean to do that; it was supposed to be my custom exception type astronomy.Error instead. So I fixed that case. There were also some deprecated settings in the pylint configuration file, so I fixed those too.
This commit is contained in:
@@ -6955,7 +6955,7 @@ def SphereFromVector(vector):
|
||||
dist = math.sqrt(xyproj + vector.z*vector.z)
|
||||
if xyproj == 0.0:
|
||||
if vector.z == 0.0:
|
||||
raise Exception('Zero-length vector not allowed.')
|
||||
raise Error('Zero-length vector not allowed.')
|
||||
lon = 0.0
|
||||
if vector.z < 0.0:
|
||||
lat = -90.0
|
||||
|
||||
Reference in New Issue
Block a user