Skip to content

Commit

Permalink
db.csw.admin: fix SafeConfigParser() removed from python 3.12 (#918)
Browse files Browse the repository at this point in the history
* replace with ConfigParser()
  • Loading branch information
pesekon2 committed Jul 20, 2023
1 parent 82986c2 commit 5633a4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 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 @@ -282,7 +282,7 @@ def run(self, argv):
print("ERROR: -f <cfg> is a required argument")

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

self.DATABASE = SCP.get("repository", "database")
Expand Down Expand Up @@ -348,7 +348,7 @@ def initDatabase(self):
defaultConf = os.path.join(os.getenv('GRASS_ADDON_BASE'),'wx.metadata' ,'etc','config','default-sample.cfg')
print self.database
SCP = ConfigParser.SafeConfigParser()
SCP = configparser.ConfigParser()
try:
SCP.read_file(open(conf))
except:
Expand Down

0 comments on commit 5633a4b

Please sign in to comment.