Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kiwi_boxed_plugin: utils: fetch_files: improve progressbar import #57

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

IsaacJT
Copy link
Contributor

@IsaacJT IsaacJT commented Sep 19, 2023

The progressbar2 module is installed on Debian-based systems as "progressbar2", and can be imported as such, but if progressbar2 has been installed from pip the module is called "progressbar". Adjust the import of this module to first try importing "progressbar2", and if it fails, fall back to "progressbar". This stops the tool from trying to import the old progressbar module rather than the correct progressbar2 module.

See the file lists in the python3-progressbar2 and python3-progressbar packages in Ubuntu for reference:

The progressbar2 module is installed on Debian-based systems as
"progressbar2", and can be imported as such, but if progressbar2 has been
installed from pip the module is called "progressbar". Adjust the import of
this module to first try importing "progressbar2", and if it fails, fall back
to "progressbar". This stops the tool from trying to import the old
progressbar module rather than the correct progressbar2 module.

Signed-off-by: Isaac True <[email protected]>
Copy link
Contributor

@schaefi schaefi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, much appreciated. I was always confused when some people report that there is an issue with progressbar when I don't see it, but your explanation makes complete sense 👍

@schaefi schaefi merged commit 1ffccf1 into OSInside:master Sep 29, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants