diff getan/template.py @ 431:8922713adbe6

getan-eval.py: Improves how 'user' is found.
author Bernhard Reiter <bernhard@intevation.de>
date Tue, 30 May 2017 09:01:12 +0200
parents cc56bc1fd56b
children 59d9c5840273
line wrap: on
line diff
--- a/getan/template.py	Tue May 30 08:48:36 2017 +0200
+++ b/getan/template.py	Tue May 30 09:01:12 2017 +0200
@@ -64,7 +64,7 @@
 def render(template, database=None, year=None, week=None, project=None,
            user=None, empty_projects=True):
     if not user:
-        user = os.getenv("USER")
+        user = os.getenv("USER") or "USER"
 
     if not database:
         if os.path.isfile(DEFAULT_DATABASE):
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)