Permalink
Browse files

fix for SAGE_SRC not being in the environment for classic Sage

  • Loading branch information...
1 parent be037b2 commit 6790641b54192d0d615d535b2e498627dea8ce0f @ohanar ohanar committed Apr 3, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 flask_version/base.py
View
@@ -6,7 +6,11 @@
from decorators import global_lock
from flask.ext.autoindex import AutoIndex
-SRC = os.path.join(os.environ['SAGE_SRC'], 'sage')
+try:
+ from sage.env import SAGE_SRC
+except ImportError:
+ SAGE_SRC = os.environ.get('SAGE_SRC', os.path.join(os.environ['SAGE_ROOT'], 'devel', 'sage'))
+SRC = os.path.join(SAGE_SRC, 'sage')
from flask.ext.openid import OpenID
from flask.ext.babel import Babel, gettext, ngettext, lazy_gettext, get_locale
from sagenb.misc.misc import SAGENB_ROOT, DATA, SAGE_DOC, translations_path

0 comments on commit 6790641

Please sign in to comment.