Browse Source

Merge pull request #1767 from pbiering/log-PYTHONPATH-on-start-if-given

Log pythonpath on start if given
Peter Bieringer 9 months ago
parent
commit
7b20dbda79
2 changed files with 7 additions and 1 deletions
  1. 1 0
      CHANGELOG.md
  2. 6 1
      radicale/server.py

+ 1 - 0
CHANGELOG.md

@@ -5,6 +5,7 @@
 * Fix: use value of property for time range filter
 * Add: [auth] ldap: option ldap_security (none, startls, tls) for additional support of STARTTLS, deprecate ldap_use_ssl
 * Fix: return 204 instead of 201 in case PUT updates an item
+* Extend: log PYTHONPATH on startup if found in environment
 
 ## 3.5.1
 

+ 6 - 1
radicale/server.py

@@ -24,6 +24,7 @@ Built-in WSGI server.
 """
 
 import http
+import os
 import select
 import socket
 import socketserver
@@ -292,7 +293,11 @@ def serve(configuration: config.Configuration,
 
     """
 
-    logger.info("Starting Radicale (%s)", utils.packages_version())
+    if os.environ.get("PYTHONPATH"):
+        info = "with PYTHONPATH=%r " % os.environ.get("PYTHONPATH")
+    else:
+        info = ""
+    logger.info("Starting Radicale %s(%s)", info, utils.packages_version())
     # Copy configuration before modifying
     configuration = configuration.copy()
     configuration.update({"server": {"_internal_server": "True"}}, "server",