fix bytes error in passphrase
disable early loading of MySQL config
This commit is contained in:
parent
09c66faf80
commit
e512673eb1
@ -1155,18 +1155,18 @@ if __name__ == '__main__':
|
|||||||
logger.debug('(MYSQL) MySQL config enabled')
|
logger.debug('(MYSQL) MySQL config enabled')
|
||||||
SQLCONFIG = {}
|
SQLCONFIG = {}
|
||||||
sql = useMYSQL(CONFIG['MYSQL']['SERVER'], CONFIG['MYSQL']['USER'], CONFIG['MYSQL']['PASS'], CONFIG['MYSQL']['DB'],logger)
|
sql = useMYSQL(CONFIG['MYSQL']['SERVER'], CONFIG['MYSQL']['USER'], CONFIG['MYSQL']['PASS'], CONFIG['MYSQL']['DB'],logger)
|
||||||
if sql.con():
|
#if sql.con():
|
||||||
logger.debug('(MYSQL) reading config from database')
|
# logger.debug('(MYSQL) reading config from database')
|
||||||
try:
|
# try:
|
||||||
SQLCONFIG = sql.getConfig()
|
# SQLCONFIG = sql.getConfig()
|
||||||
#Add MySQL config data to config dict
|
#Add MySQL config data to config dict
|
||||||
CONFIG['SYSTEMS'].update(SQLCONFIG)
|
# CONFIG['SYSTEMS'].update(SQLCONFIG)
|
||||||
sql.close()
|
# sql.close()
|
||||||
except:
|
# except:
|
||||||
logger.debug('(MYSQL) problem with SQL query, aborting')
|
# logger.debug('(MYSQL) problem with SQL query, aborting')
|
||||||
sql.close()
|
# sql.close()
|
||||||
else:
|
#else:
|
||||||
logger.debug('(MYSQL) problem connecting to SQL server, aborting')
|
# logger.debug('(MYSQL) problem connecting to SQL server, aborting')
|
||||||
|
|
||||||
|
|
||||||
# Set up the signal handler
|
# Set up the signal handler
|
||||||
|
@ -64,7 +64,7 @@ class useMYSQL:
|
|||||||
'MAX_PEERS': int(max_peers),
|
'MAX_PEERS': int(max_peers),
|
||||||
'IP': ip,
|
'IP': ip,
|
||||||
'PORT': int(port),
|
'PORT': int(port),
|
||||||
'PASSPHRASE': passphrase,
|
'PASSPHRASE': bytes(passphrase, 'utf-8'),
|
||||||
'GROUP_HANGTIME': int(group_hangtime),
|
'GROUP_HANGTIME': int(group_hangtime),
|
||||||
'USE_ACL': bool(use_acl),
|
'USE_ACL': bool(use_acl),
|
||||||
'REG_ACL': reg_acl,
|
'REG_ACL': reg_acl,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user