From 9e2a2fb46f29af9b1af989a578ddd2be579758dd Mon Sep 17 00:00:00 2001 From: Pingu Carsti Date: Tue, 14 May 2019 14:29:22 +0200 Subject: [PATCH] removed unused config --- development.ini | 2 -- twitcher/__init__.py | 1 - twitcher/config.py | 34 ---------------------------------- twitcher/owsproxy.py | 3 --- twitcher/rpcinterface.py | 3 --- 5 files changed, 43 deletions(-) delete mode 100644 twitcher/config.py diff --git a/development.ini b/development.ini index 4eec7468..b28f2a8e 100644 --- a/development.ini +++ b/development.ini @@ -32,8 +32,6 @@ twitcher.ows_security = true twitcher.ows_proxy = true twitcher.ows_proxy_delegate = false twitcher.ows_proxy_protected_path = /ows -twitcher.workdir = -twitcher.prefix = ### # wsgi server configuration diff --git a/twitcher/__init__.py b/twitcher/__init__.py index 59ed882e..e69b24db 100644 --- a/twitcher/__init__.py +++ b/twitcher/__init__.py @@ -9,7 +9,6 @@ def main(global_config, **settings): with Configurator(settings=settings) as config: # include twitcher components config.include('.models') - config.include('.config') config.include('.frontpage') config.include('.rpcinterface') config.include('.owsproxy') diff --git a/twitcher/config.py b/twitcher/config.py deleted file mode 100644 index f0c683cf..00000000 --- a/twitcher/config.py +++ /dev/null @@ -1,34 +0,0 @@ -import os -import tempfile - -from pyramid.settings import asbool - - -import logging -LOGGER = logging.getLogger("TWITCHER") - - -def _workdir(request): - settings = request.registry.settings - workdir = settings.get('twitcher.workdir') - workdir = workdir or tempfile.gettempdir() - if not os.path.exists(workdir): - os.makedirs(workdir) - LOGGER.debug('using workdir %s', workdir) - return workdir - - -def _prefix(request): - settings = request.registry.settings - prefix = settings.get('twitcher.prefix') - prefix = prefix or 'twitcher_' - return prefix - - -def includeme(config): - # settings = config.registry.settings - - LOGGER.debug("Loading twitcher configuration.") - - config.add_request_method(_workdir, 'workdir', reify=True) - config.add_request_method(_prefix, 'prefix', reify=True) diff --git a/twitcher/owsproxy.py b/twitcher/owsproxy.py index 6065a6b7..1bf15ffa 100644 --- a/twitcher/owsproxy.py +++ b/twitcher/owsproxy.py @@ -204,9 +204,6 @@ def owsproxy_defaultconfig(config): config.add_view(owsproxy_delegate_view, route_name='owsproxy') config.add_view(owsproxy_delegate_view, route_name='owsproxy_secured') else: - config.include('twitcher.config') - # include mongodb - # config.include('twitcher.db') config.add_view(owsproxy_view, route_name='owsproxy') config.add_view(owsproxy_view, route_name='owsproxy_secured') config.add_view(owsproxy_view, route_name='owsproxy_extra') diff --git a/twitcher/rpcinterface.py b/twitcher/rpcinterface.py index 34c6b155..b37f5d82 100644 --- a/twitcher/rpcinterface.py +++ b/twitcher/rpcinterface.py @@ -92,9 +92,6 @@ def includeme(config): if asbool(settings.get('twitcher.rpcinterface', True)): LOGGER.debug('Twitcher XML-RPC Interface enabled.') - # include twitcher config - config.include('twitcher.config') - # using basic auth config.include('twitcher.basicauth')