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

Cast _download_suffix to str before concatenation #1354

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arkq
Copy link

@arkq arkq commented Jun 27, 2024

If the _download_suffix was not loaded before, the concatenate operation will fail with TypError exception:

Traceback (most recent call last):
  File "/tmp/main.py", line 90, in <module>
    depgraph.display_problems()
  File "/home/arkq/.local/lib/python3.10/site-packages/_emerge/depgraph.py", line 10756, in display_problems
    self._show_circular_deps(self._dynamic_config._circular_deps_for_display)
  File "/home/arkq/.local/lib/python3.10/site-packages/_emerge/depgraph.py", line 10075, in _show_circular_deps
    self.display(handler.merge_list)
  File "/home/arkq/.local/lib/python3.10/site-packages/_emerge/depgraph.py", line 10263, in display
    return display(self, mylist, favorites, verbosity)
  File "/home/arkq/.local/lib/python3.10/site-packages/_emerge/resolver/output.py", line 863, in __call__
    self.verbose_size(pkg, None, pkg_info)
  File "/home/arkq/.local/lib/python3.10/site-packages/_emerge/resolver/output.py", line 318, in verbose_size
    myfilesdict = db.getfetchsizes(pkg.cpv, **kwargs)
  File "/home/arkq/.local/lib/python3.10/site-packages/portage/dbapi/porttree.py", line 1012, in getfetchsizes
    mystat = os.stat(file_path + _download_suffix)
TypeError: can only concatenate str (not "_LazyImportFrom") to str

@zmedico

This comment was marked as resolved.

If the `_download_suffix` was not loaded before, the concatenate
operation will fail with `TypError` exception:

Traceback (most recent call last):
  File "/tmp/main.py", line 90, in <module>
    depgraph.display_problems()
  File "/home/arkq/.local/lib/python3.10/site-packages/_emerge/depgraph.py", line 10756, in display_problems
    self._show_circular_deps(self._dynamic_config._circular_deps_for_display)
  File "/home/arkq/.local/lib/python3.10/site-packages/_emerge/depgraph.py", line 10075, in _show_circular_deps
    self.display(handler.merge_list)
  File "/home/arkq/.local/lib/python3.10/site-packages/_emerge/depgraph.py", line 10263, in display
    return display(self, mylist, favorites, verbosity)
  File "/home/arkq/.local/lib/python3.10/site-packages/_emerge/resolver/output.py", line 863, in __call__
    self.verbose_size(pkg, None, pkg_info)
  File "/home/arkq/.local/lib/python3.10/site-packages/_emerge/resolver/output.py", line 318, in verbose_size
    myfilesdict = db.getfetchsizes(pkg.cpv, **kwargs)
  File "/home/arkq/.local/lib/python3.10/site-packages/portage/dbapi/porttree.py", line 1012, in getfetchsizes
    mystat = os.stat(file_path + _download_suffix)
TypeError: can only concatenate str (not "_LazyImportFrom") to str

Signed-off-by: Arkadiusz Bokowy <[email protected]>
@arkq
Copy link
Author

arkq commented Jun 27, 2024

Can you sign off to comply with our certificate of origin?

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants