def get_app_server_class(): app_server = os.getenv('TACTIC_APP_SERVER') if app_server == "webware": from webware_adapter import get_app_server elif app_server == "cherrypy": import cherrypy if cherrypy.__version__.startswith("3."): from cherrypy30_adapter import get_app_server else: from cherrypy_adapter import get_app_server elif app_server == "batch": return object else: #raise AppServerException("Environment variable TACTIC_APP_SERVER not set") # default to webware for now #print "WARNING: Environment variable TACTIC_APP_SERVER not set" #from webware_adapter import get_app_server return object return get_app_server()