Skip to content

Commit

Permalink
Fix configpaser strict parsing and interpolation; fix var unpacking
Browse files Browse the repository at this point in the history
  • Loading branch information
dakcarto committed Mar 24, 2020
1 parent 2d9a533 commit 4eb1eec
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions qgis_repo/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,8 @@ def _validate_metadata(self):
# store for later updating of plugins
self.metadatatxt = [metadataname, zip_obj.read(metadataname)]
try:
parser = configparser.ConfigParser()
parser = configparser.ConfigParser(interpolation=None,
strict=False)
parser.optionxform = str
parser.read_file(io.StringIO(
codecs.decode(zip_obj.read(metadataname), "utf-8")))
Expand Down Expand Up @@ -981,7 +982,7 @@ def add_el(self, elem, tag, source, default=None):

def pyqgis_plugin_element(self):
md = self.metadata
clean_name, _ = clean_attr_value(md["name"])
clean_name = clean_attr_value(md["name"])
el = etree.Element(
"pyqgis_plugin", name=clean_name, version=md["version"])
""":type: etree._Element"""
Expand Down Expand Up @@ -1274,7 +1275,7 @@ def remove_plugin_by_name(self, name, name_suffix=None,

plugins = self.plugins_tree.root_elem()
""":type: etree._Element"""
clean_name, _ = clean_attr_value(name)
clean_name = clean_attr_value(name)
suffix = name_suffix if name_suffix is not None \
else self.plugin_name_suffix
if suffix and not clean_name.endswith(suffix):
Expand Down

0 comments on commit 4eb1eec

Please sign in to comment.