move hook import to global scope for issue 3289

This commit is contained in:
Damien Elmes 2012-09-09 08:20:11 +09:00
parent 8dee8a9add
commit 926d407f30

View file

@ -6,6 +6,7 @@ from aqt.qt import *
import locale, gettext import locale, gettext
import anki.lang import anki.lang
from anki.consts import HELP_SITE as appHelpSite from anki.consts import HELP_SITE as appHelpSite
from anki.hooks import runHook
appVersion="2.0-rc4" appVersion="2.0-rc4"
appWebsite="http://ankisrs.net/" appWebsite="http://ankisrs.net/"
@ -160,7 +161,6 @@ class AnkiApp(QApplication):
################################################## ##################################################
def event(self, evt): def event(self, evt):
from anki.hooks import runHook
if evt.type() == QEvent.FileOpen: if evt.type() == QEvent.FileOpen:
self.emit(SIGNAL("appMsg"), evt.file() or "raise") self.emit(SIGNAL("appMsg"), evt.file() or "raise")
return True return True