def _start_process(self):
act = 'Start' if self._reloads == 0 else 'Restart'
logger.info('%sing dev server at http://%s:%s ?', act, self._config.host, self._config.main_port)
try:
tty_path = os.ttyname(sys.stdin.fileno())
except OSError: # pragma: no branch
# fileno() always fails with pytest
tty_path = '/dev/tty'
except AttributeError:
# on windows, without a windows machine I've no idea what else to do here
tty_path = None
self._process = Process(target=serve_main_app, args=(self._config, tty_path))
self._process.start()
评论列表
文章目录