fix bytes error in passphrase

disable early loading of MySQL config
This commit is contained in:
Simon 2020-10-03 22:03:14 +01:00
parent 09c66faf80
commit e512673eb1
2 changed files with 12 additions and 12 deletions

View File

@ -1155,18 +1155,18 @@ if __name__ == '__main__':
logger.debug('(MYSQL) MySQL config enabled')
SQLCONFIG = {}
sql = useMYSQL(CONFIG['MYSQL']['SERVER'], CONFIG['MYSQL']['USER'], CONFIG['MYSQL']['PASS'], CONFIG['MYSQL']['DB'],logger)
if sql.con():
logger.debug('(MYSQL) reading config from database')
try:
SQLCONFIG = sql.getConfig()
#if sql.con():
# logger.debug('(MYSQL) reading config from database')
# try:
# SQLCONFIG = sql.getConfig()
#Add MySQL config data to config dict
CONFIG['SYSTEMS'].update(SQLCONFIG)
sql.close()
except:
logger.debug('(MYSQL) problem with SQL query, aborting')
sql.close()
else:
logger.debug('(MYSQL) problem connecting to SQL server, aborting')
# CONFIG['SYSTEMS'].update(SQLCONFIG)
# sql.close()
# except:
# logger.debug('(MYSQL) problem with SQL query, aborting')
# sql.close()
#else:
# logger.debug('(MYSQL) problem connecting to SQL server, aborting')
# Set up the signal handler

View File

@ -64,7 +64,7 @@ class useMYSQL:
'MAX_PEERS': int(max_peers),
'IP': ip,
'PORT': int(port),
'PASSPHRASE': passphrase,
'PASSPHRASE': bytes(passphrase, 'utf-8'),
'GROUP_HANGTIME': int(group_hangtime),
'USE_ACL': bool(use_acl),
'REG_ACL': reg_acl,