Skip to content

Commit

Permalink
use ConfigParser instead of SafeConfigParser (fix #345)
Browse files Browse the repository at this point in the history
  • Loading branch information
minorua committed Aug 27, 2024
1 parent 875c025 commit fa8583a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pluginsettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# begin: 2014-01-10

import configparser
from configparser import ConfigParser
import os
from PyQt5.QtCore import Qt, QDir, QSettings
from PyQt5.QtWidgets import QDialog, QFileDialog, QAbstractItemView, QHeaderView, QTableWidgetItem
Expand Down Expand Up @@ -44,10 +44,10 @@ def __init__(self, parent):
if name[0] == "_": # skip __pycache__ dir.
continue

parser = configparser.SafeConfigParser()
parser = ConfigParser()
try:
with open(os.path.join(plugin_dir.absoluteFilePath(name), "metadata.txt"), "r", encoding="utf-8") as f:
parser.readfp(f)
parser.read_file(f)

metadata = dict(parser.items("general"))
self.plugin_metadata.append(metadata)
Expand Down

0 comments on commit fa8583a

Please sign in to comment.