Mercurial > libervia-web
diff twisted/plugins/libervia_server.py @ 1199:b300eaec53b6
server: don't raise error anymore if themes_dir is invalid or legacy blog can't be created:
legacy blog will be entirely removed with 0.8 release, and themes_dir is only used by it.
This patch limit troubles with this old code by not raising an error anymore if option is
wrong or if the legacy blog can't be created.
fix 317
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 09 Jul 2019 20:20:46 +0200 |
parents | 49ff1330c9d0 |
children | b2d067339de3 |
line wrap: on
line diff
--- a/twisted/plugins/libervia_server.py Sat Jul 06 14:11:10 2019 +0200 +++ b/twisted/plugins/libervia_server.py Tue Jul 09 20:20:46 2019 +0200 @@ -103,9 +103,11 @@ ) themes_dir = os.path.join(value, C.THEMES_DIR) if not os.path.isfile(os.path.join(themes_dir, "default/styles/blog.css")): - raise ValueError( - "%s is not a Libervia's server data directory" % os.path.realpath(themes_dir) - ) + # XXX: we just display a message, as themes_dir is only used by legacy blog + # which will be removed entirely in 0.8 + # TODO: remove entirely legacy blog and linked options + print "%s is not a Libervia's server data directory" % os.path.realpath( + themes_dir) return value