Cleanup errors

This commit is contained in:
Cort Buffington 2016-11-25 08:14:36 -06:00
parent 141fa3ecc4
commit 03e2dff984
2 changed files with 4 additions and 3 deletions

View File

@ -103,6 +103,7 @@ def build_acl():
# Depending on which type of ACL is used (PERMIT, DENY... or there isn't one)
# define a differnet function to be used to check the ACL
global allow_sub
if ACL_ACTION == 'PERMIT':
def allow_sub(_sub):
if _sub in ACL:
@ -387,7 +388,7 @@ if __name__ == '__main__':
import sys
import os
import signal
from dmrutils import try_download, mk_id_dict
from dmr_utils import try_download, mk_id_dict
#

View File

@ -181,7 +181,7 @@ class HBSYSTEM(DatagramProtocol):
def master_dereg(self):
for _client in self._clients:
self.send_client(_client, 'MSTCL'+_client)
self._logger.info('(%s) De-Registration sent to Client: %s (%s)', self._system, self._clients[_client]['CALLSIGN'], self._clients[_client][client]['RADIO_ID'])
self._logger.info('(%s) De-Registration sent to Client: %s (%s)', self._system, self._clients[_client]['CALLSIGN'], self._clients[_client]['RADIO_ID'])
def client_dereg(self):
self.send_master('RPTCL'+self._config['RADIO_ID'])
@ -271,7 +271,7 @@ class HBSYSTEM(DatagramProtocol):
_this_client['LAST_PING'] = time()
_sent_hash = _data[8:]
_salt_str = hex_str_4(_this_client['SALT'])
_calc_hash = a(sha256(_salt_str+self._config['PASSPHRASE']).hexdigest())
_calc_hash = bhex(sha256(_salt_str+self._config['PASSPHRASE']).hexdigest())
if _sent_hash == _calc_hash:
_this_client['CONNECTION'] = 'WAITING_CONFIG'
self.send_client(_radio_id, 'RPTACK'+_radio_id)