Skip to content

Commit

Permalink
db.csw.admin: fix readfp() removed from python 3.12 (#919)
Browse files Browse the repository at this point in the history
  • Loading branch information
pesekon2 committed Jul 19, 2023
1 parent 164df51 commit 82986c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/wxpython/wx.metadata/db.csw.admin/db.csw.admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def run(self, argv):

if self.COMMAND not in ["post_xml"]:
SCP = configparser.SafeConfigParser()
SCP.readfp(open(self.CFG))
SCP.read_file(open(self.CFG))

self.DATABASE = SCP.get("repository", "database")
self.URL = SCP.get("server", "url")
Expand Down Expand Up @@ -350,10 +350,10 @@ def initDatabase(self):
SCP = ConfigParser.SafeConfigParser()
try:
SCP.readfp(open(conf))
SCP.read_file(open(conf))
except:
shutil.copy2(defaultConf, conf)
SCP.readfp(open(conf))
SCP.read_file(open(conf))
DATABASE = SCP.get('repository', 'database')
#URL = SCP.get('server', 'url')
Expand Down

0 comments on commit 82986c2

Please sign in to comment.