# HG changeset patch
# User John Cremona
# Date 1220437680 -3600
# Node ID 2ad2b753b007d786452ada18328de93e7bf2bb28
# Parent 8b27d76364b3639bae611329a30b123171f57a9c
#1115: fix getting of gens from database curve
diff -r 8b27d76364b3 -r 2ad2b753b007 sage/schemes/elliptic_curves/ell_rational_field.py
--- a/sage/schemes/elliptic_curves/ell_rational_field.py Wed Sep 03 14:15:22 2008 +1000
+++ b/sage/schemes/elliptic_curves/ell_rational_field.py Wed Sep 03 11:28:00 2008 +0100
@@ -1331,14 +1331,18 @@
# If the optional extended database is installed and an
# isomorphic curve is in the database then its gens will be
- # known:
+ # known; if only the default database is installed, the rank
+ # will be known but not the gens.
if use_database:
try:
E = self.database_curve()
iso = E.isomorphism_to(self)
- self.__gens[True] = [iso(P) for P in E.gens(use_database=False)]
- return self.__gens[True]
+ try:
+ self.__gens[True] = [iso(P) for P in E.__gens[True]]
+ return self.__gens[True]
+ except KeyError: # database curve does not have the gens
+ pass
except (RuntimeError, KeyError): # curve or gens not in database
pass