Print version on startup

The version is determined from either the contents of _version.py
(expected to be present in release tarballs) or the output of
`git describe --always`.
This commit is contained in:
flan
2020-01-04 05:36:14 +01:00
parent aaf7e8b5e8
commit c07fe0e65c
3 changed files with 31 additions and 0 deletions

View File

@@ -642,6 +642,8 @@ def make_app(global_conf, **local_conf):
def main():
logging.basicConfig(level=logging.INFO, format="[%(asctime)s]:%(levelname)s:%(name)s:%(message)s")
import ankisyncd
logger.info("ankisyncd {} ({})".format(ankisyncd._get_version(), ankisyncd._homepage))
from wsgiref.simple_server import make_server, WSGIRequestHandler
from ankisyncd.thread import shutdown
import ankisyncd.config