2024-08-09 Fred Gleason <fredg@paravelsystems.com>

Modified the 'PyPAD' Python module to use 'configparser.read_file()'
	instead of 'configparser.readfp()'.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2024-08-09 12:11:13 -04:00
parent a5bed2d101
commit deae348682
2 changed files with 5 additions and 2 deletions

View File

@ -24840,3 +24840,6 @@
* Incremented the package version to 4.3.0int2.
2024-08-08 Fred Gleason <fredg@paravelsystems.com>
* Added a 'NULL POINTERS' section to 'CODINGSTYLE'.
2024-08-09 Fred Gleason <fredg@paravelsystems.com>
Modified the 'PyPAD' Python module to use 'configparser.read_file()'
instead of 'configparser.readfp()'.

View File

@ -818,7 +818,7 @@ class Receiver(object):
def __getDbCredentials(self):
config=configparser.ConfigParser()
config.readfp(open('/etc/rd.conf'))
config.read_file(open('/etc/rd.conf'))
return (config.get('mySQL','Loginname'),config.get('mySQL','Password'),
config.get('mySQL','Hostname'),config.get('mySQL','Database'))
@ -925,7 +925,7 @@ class Receiver(object):
# Open rd.conf(5)
rd_config=configparser.ConfigParser(interpolation=None)
rd_config.readfp(open('/etc/rd.conf'))
rd_config.read_file(open('/etc/rd.conf'))
# Open the syslog
pypad_name=sys.argv[0].split('/')[-1]