From 98dde0a3d1d9cb8030c1f391ea82fad71e9ddc76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volkan=20=C5=9Eahin?= Date: Fri, 22 Jul 2016 10:38:59 +0300 Subject: [PATCH] new conf parameters serving --- opt/ahenk/base/system/system.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/opt/ahenk/base/system/system.py b/opt/ahenk/base/system/system.py index c7ae0a9..1eb5aa5 100644 --- a/opt/ahenk/base/system/system.py +++ b/opt/ahenk/base/system/system.py @@ -41,6 +41,27 @@ class System: config.read(System.Ahenk.config_path()) return config.get('BASE', 'dbPath') + @staticmethod + def agreement_timeout(): + config = configparser.ConfigParser() + config._interpolation = configparser.ExtendedInterpolation() + config.read(System.Ahenk.config_path()) + return config.get('SESSION', 'agreement_timeout') + + @staticmethod + def registration_timeout(): + config = configparser.ConfigParser() + config._interpolation = configparser.ExtendedInterpolation() + config.read(System.Ahenk.config_path()) + return config.get('SESSION', 'registration_timeout') + + @staticmethod + def get_policy_timeout(): + config = configparser.ConfigParser() + config._interpolation = configparser.ExtendedInterpolation() + config.read(System.Ahenk.config_path()) + return config.get('SESSION', 'get_policy_timeout') + @staticmethod def plugins_path(): config = configparser.ConfigParser() @@ -89,7 +110,7 @@ class System: def received_dir_path(): path = '/tmp/.ahenk/' if Util.is_exist(path) is False: - #TODO write permission add + # TODO write permission add Util.create_directory(path) return path