mirror of
https://github.com/samba-team/samba.git
synced 2025-12-13 16:23:50 +03:00
gp: Use read_file() instead of readfp()
readfp() is deprecated and could be removed in a future version of Python. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
34042677b7
commit
2b566979ac
@@ -38,7 +38,7 @@ class GPIniParser(GPParser):
|
||||
interpolation=None)
|
||||
self.ini_conf.optionxform = str
|
||||
|
||||
self.ini_conf.readfp(StringIO(contents.decode(self.encoding)))
|
||||
self.ini_conf.read_file(StringIO(contents.decode(self.encoding)))
|
||||
|
||||
def build_xml_parameter(self, section_xml, section, key_ini, val_ini):
|
||||
child = SubElement(section_xml, 'Parameter')
|
||||
@@ -117,7 +117,7 @@ class GPTIniParser(GPIniParser):
|
||||
self.ini_conf.optionxform = str
|
||||
|
||||
# Fallback to Latin-1 which RSAT appears to use
|
||||
self.ini_conf.readfp(StringIO(contents.decode('iso-8859-1')))
|
||||
self.ini_conf.read_file(StringIO(contents.decode('iso-8859-1')))
|
||||
|
||||
|
||||
class GPScriptsIniParser(GPIniParser):
|
||||
|
||||
Reference in New Issue
Block a user