server.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:sysdweb 作者: ogarcia 项目源码 文件源码
def get_service_journal_page(service):
    if service in config.sections():
        if get_service_action(service, 'status')['status'] == 'not-found':
            abort(400,'Sorry, but service \'{}\' unit not found in system.'.format(config.get(service, 'title')))
        journal_lines = get_service_journal(service, 100)
        return template('journal', hostname=gethostname(), service=config.get(service, 'title'), journal=journal_lines['journal'])
    else:
        abort(400, 'Sorry, but \'{}\' is not defined in config.'.format(service))

# Serve static content
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号