Guts / qgis-deployment-cli

Cross-platform (but focused on Windows) CLI to perform deployment operations: profiles, plugins, etc.
https://guts.github.io/qgis-deployment-cli/
Apache License 2.0
18 stars 2 forks source link

Improve: qdt files reliability #514

Closed Guts closed 5 months ago

Guts commented 5 months ago

This PR improve qdt-files.json (HTTP handler) parsing reliability handling cases where qdt-files.json generated with tree without the --prune option and containing empty folders makes crash the reader.

2024-05-29 09:50:42||ERROR||bouncer||exit_cli_error||43||'NoneType' object is not iterable
Traceback (most recent call last):
  File "qgis_deployment_toolbelt/commands/deployment.py", line 205, in run
  File "qgis_deployment_toolbelt/jobs/job_profiles_downloader.py", line 130, in run
  File "qgis_deployment_toolbelt/profiles/remote_http_handler.py", line 120, in download
  File "qgis_deployment_toolbelt/profiles/remote_http_handler.py", line 158, in tree_to_download_list
  File "qgis_deployment_toolbelt/profiles/remote_http_handler.py", line 158, in tree_to_download_list
  File "qgis_deployment_toolbelt/profiles/remote_http_handler.py", line 150, in tree_to_download_list
TypeError: 'NoneType' object is not iterable
2024-05-29 09:50:42||ERROR||bouncer||exit_cli_error||44||Please, read the full detailed log: /home/florian.bocquet/.cache/qgis-deployment-toolbelt/logs/QGISDeploymentToolbelt_0.34.2.log
'NoneType' object is not iterable

Spotted by @Niarolf

codecov-commenter commented 5 months ago

Codecov Report

Attention: Patch coverage is 95.83333% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 66.73%. Comparing base (e456316) to head (00faae8).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Guts/qgis-deployment-cli/pull/514/graphs/tree.svg?width=650&height=150&src=pr&token=ZHGRNMA7TV&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julien)](https://app.codecov.io/gh/Guts/qgis-deployment-cli/pull/514?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julien) ```diff @@ Coverage Diff @@ ## main #514 +/- ## ========================================== - Coverage 70.69% 66.73% -3.97% ========================================== Files 48 49 +1 Lines 3078 3084 +6 Branches 662 664 +2 ========================================== - Hits 2176 2058 -118 - Misses 711 831 +120 - Partials 191 195 +4 ``` | [Flag](https://app.codecov.io/gh/Guts/qgis-deployment-cli/pull/514/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julien) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/Guts/qgis-deployment-cli/pull/514/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julien) | `66.53% <95.83%> (-3.55%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julien#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/Guts/qgis-deployment-cli/pull/514?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julien) | Coverage Δ | | |---|---|---| | [...gis\_deployment\_toolbelt/utils/tree\_files\_reader.py](https://app.codecov.io/gh/Guts/qgis-deployment-cli/pull/514?src=pr&el=tree&filepath=qgis_deployment_toolbelt%2Futils%2Ftree_files_reader.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julien#diff-cWdpc19kZXBsb3ltZW50X3Rvb2xiZWx0L3V0aWxzL3RyZWVfZmlsZXNfcmVhZGVyLnB5) | `100.00% <100.00%> (ø)` | | | [...eployment\_toolbelt/profiles/remote\_http\_handler.py](https://app.codecov.io/gh/Guts/qgis-deployment-cli/pull/514?src=pr&el=tree&filepath=qgis_deployment_toolbelt%2Fprofiles%2Fremote_http_handler.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julien#diff-cWdpc19kZXBsb3ltZW50X3Rvb2xiZWx0L3Byb2ZpbGVzL3JlbW90ZV9odHRwX2hhbmRsZXIucHk=) | `34.00% <50.00%> (+0.66%)` | :arrow_up: | ... and [7 files with indirect coverage changes](https://app.codecov.io/gh/Guts/qgis-deployment-cli/pull/514/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julien)
sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud