def main(): try: from utils.server import Server server = Server() except: traceback.print_exc() time.sleep(0) input('Exception occurred, press Enter to exit') else: server.start()
def main(): print('{} {} is starting up'.format(constant.NAME, constant.VERSION)) print('{} is open source, u can find it here: {}'.format(constant.NAME, constant.GITHUB_URL)) print('{} is still in development, it may not work well'.format(constant.NAME)) try: server = Server() except: print('Fail to initialize {}'.format(constant.NAME_SHORT)) raise else: server.start()
def environment_setup(request): """ Setup testing environment """ # TODO: # start selenium remote server if needed # start test server if needed print('Starting webserver') server = Server(config['server_address'], config['server_port']) # import pdb;pdb.set_trace() server.start() def tear_down_session(): print('[Session tear down]') print('Closing session....') # shutdown selenim server # shutdown test server server.stop() print('Test run complete') request.addfinalizer(tear_down_session)
# -*- coding: utf-8 -*- from utils.server import Server from utils import constant if __name__ == '__main__': print('{} {} starting up'.format(constant.NAME_SHORT, constant.VERSION)) print( '{} is open source, u can find it here: https://github.com/Fallen-Breath/MCDReforged' .format(constant.NAME_SHORT)) print('{} is still in development, it may not work well'.format( constant.NAME_SHORT)) try: server = Server() except: print(f'Fail to initialize {constant.NAME_SHORT}') raise server.start()