Projet

Général

Profil

0009-trivial-remove-unused-get_template_from_script-funct.patch

Frédéric Péters, 04 avril 2021 17:20

Télécharger (1,08 ko)

Voir les différences:

Subject: [PATCH 09/15] trivial: remove unused get_template_from_script
 function (#52732)

 wcs/qommon/template.py | 10 ----------
 1 file changed, 10 deletions(-)
wcs/qommon/template.py
34 34
from . import ezt, force_str
35 35

  
36 36

  
37
def get_template_from_script(filename):
38
    local_result = {}
39
    exec(
40
        open(filename).read(),
41
        {'publisher': get_publisher(), 'request': get_request(), '__file__': filename},
42
        local_result,
43
    )
44
    return local_result.get('template_content')
45

  
46

  
47 37
def get_theme_directory(theme_id):
48 38
    system_location = os.path.join(get_publisher().data_dir, 'themes', theme_id)
49 39
    local_location = os.path.join(get_publisher().app_dir, 'themes', theme_id)
50
-