From 32537ffe303b2d4fbc5419ceaa2b7ef78952f869 Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Thu, 29 May 2014 14:34:53 +0200 Subject: [PATCH] =?UTF-8?q?Jours=20f=C3=A9ri=C3=A9s=20d=C3=A9brid=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestion/config/firewall.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gestion/config/firewall.py b/gestion/config/firewall.py index f7ae5cae..ebfdd281 100644 --- a/gestion/config/firewall.py +++ b/gestion/config/firewall.py @@ -4,6 +4,8 @@ """ Variables de configuration pour le firewall """ import datetime +from .feries import is_ferie + #: Interfaces réseaux des machines ayant un pare-feu particulié dev = { 'komaz': { @@ -40,7 +42,7 @@ mask = [24] # Empiriquement, 95 correspond à un débit de 100Mbit/s # sur des outils tels que munin now=datetime.datetime.now() -if now.hour >= 6 and now.hour < 19 and now.weekday() < 5: +if now.hour >= 6 and now.hour < 19 and now.weekday() < 5 and not is_ferie(): #: Débit maximal autorisé debit_max = 95 * 1024 / 8 # kbytes per second en connexion de jour #: Est-ce qu'on est en connexion de jour ou de nuit/week-end ?