mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-12-05 01:31:33 +00:00
Rename TFWENV constant to use capital letters
This commit is contained in:
parent
ff13cf4dcd
commit
5a5045ff3b
@ -5,17 +5,17 @@ from tornado.ioloop import IOLoop
|
||||
|
||||
from sql_injection_fsm import SQLInjectionFSM
|
||||
from tfw.networking.server.tfw_server import TFWServer
|
||||
from tfw.config import tfwenv
|
||||
from tfw.config import TFWENV
|
||||
from tfw.config.logs import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
server = TFWServer(SQLInjectionFSM)
|
||||
server.listen(tfwenv.WEB_PORT)
|
||||
server.listen(TFWENV.WEB_PORT)
|
||||
log.debug('Python version: {}'.format(sys.version[:5]))
|
||||
log.debug('Tornado version: {}'.format(tornado.version))
|
||||
log.debug('ZeroMQ version: {}'.format(zmq.zmq_version()))
|
||||
log.debug('PyZMQ version: {}'.format(zmq.pyzmq_version()))
|
||||
log.info('Tornado application listening on port {}'.format(tfwenv.WEB_PORT))
|
||||
log.info('Tornado application listening on port {}'.format(TFWENV.WEB_PORT))
|
||||
IOLoop.instance().start()
|
||||
|
@ -3,13 +3,13 @@ from tornado.ioloop import IOLoop
|
||||
from tfw.components.source_code_event_handler import SourceCodeEventHandler
|
||||
from tfw.components.terminado_event_handler import TerminadoEventHandler
|
||||
from tfw.components.process_managing_event_handler import ProcessManagingEventHandler
|
||||
from tfw.config import tfwenv
|
||||
from tfw.config import TFWENV
|
||||
from tfw.config.logs import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
ide = SourceCodeEventHandler(key='webide', directory=tfwenv.WEBIDE_WD, exclude=['__pycache__'])
|
||||
ide = SourceCodeEventHandler(key='webide', directory=TFWENV.WEBIDE_WD, exclude=['__pycache__'])
|
||||
terminado = TerminadoEventHandler(key='shell')
|
||||
terminado.historymonitor.subscribe_callback(callback=lambda hist: log.debug('User executed command: "{}"'.format(hist[-1])))
|
||||
processmanager = ProcessManagingEventHandler(key='processmanager', dirmonitor=ide.monitor)
|
||||
|
@ -2,9 +2,9 @@ import json, sys
|
||||
from tornado.ioloop import IOLoop
|
||||
from tornado.web import RequestHandler, Application
|
||||
|
||||
from tfw.config import tfwenv
|
||||
from tfw.config import TFWENV
|
||||
|
||||
sys.path.append(tfwenv.WEBIDE_WD)
|
||||
sys.path.append(TFWENV.WEBIDE_WD)
|
||||
from login_component import authorize_login
|
||||
|
||||
|
||||
@ -23,5 +23,5 @@ class LoginHandler(RequestHandler):
|
||||
|
||||
if __name__ == '__main__':
|
||||
application = Application([(r'/login', LoginHandler)])
|
||||
application.listen(tfwenv.LOGIN_APP_PORT)
|
||||
application.listen(TFWENV.LOGIN_APP_PORT)
|
||||
IOLoop.instance().start()
|
||||
|
Loading…
Reference in New Issue
Block a user