diff --git a/pagure/docs_server.py b/pagure/docs_server.py index 62293b6..ea5450d 100644 --- a/pagure/docs_server.py +++ b/pagure/docs_server.py @@ -43,6 +43,24 @@ APP.logger.addHandler(SHANDLER) LOG = APP.logger +TMPL_HTML = ''' + + +
+ + + + +{content} + + +''' + def __get_tree(repo_obj, tree, filepath, index=0, extended=False): ''' Retrieve the entry corresponding to the provided filename in a @@ -149,4 +167,13 @@ def view_docs(repo, username=None, filename=None): elif filename.endswith('.js'): mimetype = 'application/javascript' + if not filename and not content: + if not len(tree): + flask.abort(404, 'No content found is the repository') + html = '