Skip to content

Commit

Permalink
Fix regression about CMD arguments, release of 0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Sep 26, 2022
1 parent 6e36311 commit 50ef78b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 0.4.2 - 2022-09-26

* Fix regression from the latest release

## 0.4.1 - 2022-09-26

* Remove some print statements
Expand Down
4 changes: 2 additions & 2 deletions qgis_plugin_repo/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def main():
print(f"{plugin.name} {plugin.version}")

elif args.command == "merge":
if len(args.output_xml) >= 1:
if len(args.output_xml) >= 2:
print(
"More than one XML file detected for the output. "
"All these files will be checked for QGIS versions :")
Expand All @@ -77,7 +77,7 @@ def main():
"A single XML file detected for the output."
"This file is going to be edited whatever it's has a QGIS version."
)
merger = Merger(args.output_xml, args.input_xml)
merger = Merger(args.output_xml[0], args.input_xml)
merger.xml_input_parser()
merger.xml_output_parser()
merger.merge()
Expand Down
2 changes: 2 additions & 0 deletions qgis_plugin_repo/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def __init__(self, input_uri: Union[Path, str], outputs_uri: List[Union[Path, st
if is_url(input_uri):
self.input_parser = ET.fromstring(requests.get(self.input_uri).content)
else:
if isinstance(self.input_uri, str):
self.input_uri = Path(self.input_uri)
self.input_parser = ET.parse(self.input_uri.absolute()).getroot()

self.outputs_uri = [Path(f) for f in outputs_uri]
Expand Down

0 comments on commit 50ef78b

Please sign in to comment.