Bug 655856
| Summary: | urlgrabber does not raise an exception for non-existent files (using ftp protocol) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Petr Šplíchal <psplicha> | ||||
| Component: | python-urlgrabber | Assignee: | Valentina Mukhamedzhanova <vmukhame> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 5.6 | CC: | jzeleny, ohudlick, psplicha | ||||
| Target Milestone: | rc | Keywords: | Patch | ||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-06-02 13:04:08 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate, in the next release of Red Hat Enterprise Linux. Reproduced. Indeed, this is a serious bug that should be fixed. It's a bug in Python's urllib.py module, but we can very likely work this around in urlgrabber. Created attachment 838481 [details]
work around a bug in urllib's ftpwrapper.
For some reasons, ftpwrapper first checks if file exists with ftp NLST command, then downloads with RETR, ignoring 550 file not found errors. But since ftp.nlst () just returns an empty list instead of raising an exception, the error is ignored. The missing content-length seems to be a reliable inidicator that the file was not found, so we may use it to work this around in urlgrabber.
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate, in the next release of Red Hat Enterprise Linux. This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug. Thank you for submitting this request for inclusion in Red Hat Enterprise Linux 5. We've carefully evaluated the request, but are unable to include it in RHEL5 stream. If the issue is critical for your business, please provide additional business justification through the appropriate support channels (https://access.redhat.com/site/support). |
Description of problem: Trying to fetch a non-existent file using python urlgrabber module results in a silent pass although no files are actually fetched. Version-Release number of selected component (if applicable): python-urlgrabber-3.1.0-6.el5 Steps to Reproduce: # python -c 'import urlgrabber; urlgrabber.urlgrab("ftp://ftp.redhat.com/redhat/missing.txt", "missing.txt")' Actual results: # echo $? 0 # cat missing.txt <nothing> Expected results: An exception raised, "Not Found" or similar error message displayed. Additional info: Works as expected when using httpd protocol.