Skip to content

Commit c192529

Browse files
committed
check hook exists, close #109
1 parent e0e3b45 commit c192529

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

AnkiHabitica/__init__.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from . import db_helper, habitica_class
3232
from .ah_common import AnkiHabiticaCommon as ah
3333

34-
__version__ = "2.1.10"
34+
__version__ = "2.1.11"
3535

3636
ah.user_settings = mw.addonManager.getConfig(__name__)
3737

@@ -726,7 +726,10 @@ def check_unsynced_score():
726726

727727

728728
if new_hook:
729-
gui_hooks.sync_did_finish.append(check_unsynced_score)
729+
try:
730+
gui_hooks.sync_did_finish.append(check_unsynced_score)
731+
except AttributeError:
732+
pass
730733

731734
#################################
732735
### Support Multiple Profiles ###

0 commit comments

Comments
 (0)