From: Michael Orlitzky Date: Sun, 11 Oct 2020 13:10:38 +0000 (-0400) Subject: eja: ignore errors more specifically in a_jordan_frame(). X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=9632a965029feadbb70d18574f8704812ed71321;p=sage.d.git eja: ignore errors more specifically in a_jordan_frame(). --- diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index 9198a8b..389efbf 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -857,8 +857,11 @@ class FiniteDimensionalEuclideanJordanAlgebra(CombinatorialFreeModule): # two dimensional). s = FiniteDimensionalEuclideanJordanSubalgebra(self, sb) subalgebras.append(s) - except: - pass + except ArithmeticError as e: + if str(e) == "vector is not in free module": + # Ignore only the "not a sub-EJA" error + pass + if len(subalgebras) >= 2: # apply this method recursively. return tuple( c.superalgebra_element()