bugfixes
This commit is contained in:
13
MathGen.py
13
MathGen.py
@@ -12,10 +12,6 @@ import logging
|
|||||||
from subprocess import call
|
from subprocess import call
|
||||||
|
|
||||||
|
|
||||||
#logging.warning('Watch out!') # will print a message to the console
|
|
||||||
#logging.info('I told you so') # will not print anything
|
|
||||||
|
|
||||||
|
|
||||||
class mathPage:
|
class mathPage:
|
||||||
def __init__(self, mathID, verbose=False):
|
def __init__(self, mathID, verbose=False):
|
||||||
"""
|
"""
|
||||||
@@ -809,8 +805,11 @@ class mathGenealogy(Graph):
|
|||||||
adv = []
|
adv = []
|
||||||
for a in res:
|
for a in res:
|
||||||
if a > 0:
|
if a > 0:
|
||||||
cur.execute(query, (a,))
|
try:
|
||||||
advID = cur.fetchall()[0][0]
|
cur.execute(query, (a,))
|
||||||
|
advID = cur.fetchall()[0][0]
|
||||||
|
except IndexError:
|
||||||
|
logging.warning(f"No entry for {a}")
|
||||||
adv.append(advID)
|
adv.append(advID)
|
||||||
return(tuple(adv))
|
return(tuple(adv))
|
||||||
|
|
||||||
@@ -1196,7 +1195,7 @@ class mathGenealogy(Graph):
|
|||||||
else:
|
else:
|
||||||
fn = filename
|
fn = filename
|
||||||
if bgcolor != "white":
|
if bgcolor != "white":
|
||||||
self.__backColor = bgcolor
|
self.__graphOptions['bgcolor'] = bgcolor
|
||||||
if not filename:
|
if not filename:
|
||||||
filename = "tmp_"+str(random.randint(1,9999999))
|
filename = "tmp_"+str(random.randint(1,9999999))
|
||||||
self.save(fn+".dot")
|
self.save(fn+".dot")
|
||||||
|
|||||||
Reference in New Issue
Block a user