From b7f6b62993893881bdeb05bbfc57d824e0c5e40a Mon Sep 17 00:00:00 2001 From: Cort Buffington Date: Sun, 17 May 2015 08:14:29 -0500 Subject: [PATCH] bridge_rules.py and dmrlink.cfg checking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit exit if the IPSCs in dmrlink.cfg (or specified file) don’t match the IPSCs specified in bridge_rules.py --- bridge.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bridge.py b/bridge.py index ab77338..64280b5 100755 --- a/bridge.py +++ b/bridge.py @@ -79,7 +79,11 @@ for _ipsc in RULES: _rule['DST_GROUP'] = hex_str_3(_rule['DST_GROUP']) _rule['SRC_TS'] = _rule['SRC_TS'] - 1 _rule['DST_TS'] = _rule['DST_TS'] - 1 - + if _ipsc not in NETWORK: + sys.exit('ERROR: Bridge rules found for an IPSC network not configured in main configuration') +for _ipsc in NETWORK: + if _ipsc not in RULES: + sys.exit('ERROR: Bridge rules not found for all IPSC network configured') # Import List of Bridges # This is how we identify known bridges. If one of these is present