Update ankiconnect.py

This commit is contained in:
恍兮惚兮 2024-08-07 23:58:43 +08:00
parent 0f25577411
commit b2396f109f

View File

@ -91,8 +91,6 @@ class Card:
class Model:
@staticmethod
def create(modelName, inOrderFields: list, css, isCloze, cardTemplates):
try:
print(
invoke(
"createModel",
modelName=modelName,
@ -101,12 +99,6 @@ class Model:
isCloze=isCloze,
cardTemplates=cardTemplates,
)
)
except AnkiException as e:
if str(e) == "Model name already exists":
pass
else:
raise e
return Model(modelName)
def __init__(self, name):