move forms check out of script root so we can report python3 error

This commit is contained in:
Damien Elmes 2012-04-23 08:27:57 +09:00
parent e63370a602
commit c08b561f2f
2 changed files with 9 additions and 8 deletions

9
anki
View file

@ -11,12 +11,5 @@ if __name__ == "__main__":
modDir=runningDir
sys.path.insert(0, os.path.join(modDir, "libanki"))
sys.path.insert(0, os.path.join(os.path.join(modDir, ".."), "libanki"))
import aqt
try:
import aqt.forms
except ImportError, e:
if "aqt.forms" in str(e):
print "If you're running from git, did you run build_ui.sh?"
print
raise
import anki, aqt
aqt.run()

View file

@ -16,6 +16,14 @@ mw = None # set on init
moduleDir = os.path.split(os.path.dirname(os.path.abspath(__file__)))[0]
try:
import aqt.forms
except ImportError, e:
if "aqt.forms" in str(e):
print "If you're running from git, did you run build_ui.sh?"
print
raise
# Dialog manager - manages modeless windows
##########################################################################