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:
Don Cross
2023-02-07 14:27:06 -05:00
parent 1624ca0890
commit 341a4bbaec
4 changed files with 5 additions and 8 deletions

View File

@@ -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