]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: ignore errors more specifically in a_jordan_frame().
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 11 Oct 2020 13:10:38 +0000 (09:10 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 11 Oct 2020 13:10:38 +0000 (09:10 -0400)
mjo/eja/eja_algebra.py

index 9198a8b124e041e4edcc4351271db01345accaa0..389efbf77219acff73db032e848e34d8da1670e9 100644 (file)
@@ -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()