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

Accept buffered IO stream objects as fd in hdrFromFdno #27

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

rajulkumar
Copy link
Contributor

@rajulkumar rajulkumar commented Jan 10, 2024

One of the tests for rcm-pa-tool failed with below error that previously worked with rpm-py-installer.

rcm_pa_tool/pa_chains/upload_rpm_to_repo.py:19: in call
    hdr = ts.hdrFromFdno(fdno)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <rpmdyn._transaction.TransactionSet object at 0x7f02ffefc650>
fd = <_io.BufferedReader name='tests/test_data/pulp-test-package-0.3.1-1.fc11.x86_64.rpm'>

    def hdrFromFdno(self, fd):
>       assert isinstance(fd, int)
E       AssertionError

fd arg to hdrFromFdno might be a buffered IO stream object like the one returned by open() as mentioed above. As rpm.transaction.hdrFromFdno accepts the buffered IO object as fd, the same method here should accept the object as well.

fd arg to hdrFromFdno might be a buffered IO stream object
like the one returned by open(). As rpm.transaction.hdrFromFdno
accepts the buffered IO object as fd, the method here should
accept the object as well.
@rohanpm rohanpm merged commit bef2c53 into rohanpm:main Jan 10, 2024
1 check 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