comparison getan/template.py @ 412:cc56bc1fd56b

Code-quality: prepares template.py for logging.
author Bernhard Reiter <bernhard@intevation.de>
date Wed, 03 May 2017 12:59:37 +0200
parents 9a0dba03d16c
children 8922713adbe6
comparison
equal deleted inserted replaced
411:0650c47e7a1c 412:cc56bc1fd56b
3 # (c) 2014 by Björn Ricks <bjoern.ricks@intevation.de> 3 # (c) 2014 by Björn Ricks <bjoern.ricks@intevation.de>
4 # 4 #
5 # This is Free Software licensed under the terms of GPLv3 or later. 5 # This is Free Software licensed under the terms of GPLv3 or later.
6 # For details see LICENSE coming with the source of 'getan'. 6 # For details see LICENSE coming with the source of 'getan'.
7 7
8 # import logging
8 import os.path 9 import os.path
9 import sys 10 import sys
10 11
11 from datetime import date, datetime, timedelta 12 from datetime import date, datetime, timedelta
12 13
13 from jinja2 import Environment, ChoiceLoader, FileSystemLoader, PackageLoader 14 from jinja2 import Environment, ChoiceLoader, FileSystemLoader, PackageLoader
14 15
15 from getan.backend import Backend, DEFAULT_DATABASE 16 from getan.backend import Backend, DEFAULT_DATABASE
17
18 # logging.basicConfig(level='DEBUG') # quick fix until getan-eval.py offers it
19 # logger = logging.getLogger()
16 20
17 21
18 def human_time(delta): 22 def human_time(delta):
19 days = delta.days 23 days = delta.days
20 seconds = days * 3600 * 24 24 seconds = days * 3600 * 24
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)