Project

Profile

Help

Issue #3270

closed

Improve exception handling for incorrect feed_url

Added by amacdona@redhat.com almost 7 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix
Sprint:
Sprint 31
Quarter:

Description

For the File plugin, the feed_url points to the manifest file, rather than the directory. Other plugins use the directory, so it is likely that others will make this mistake also.

WRONG:
feed_url = https://repos.fedorapeople.org/pulp/pulp/fixtures/file/

RIGHT:
feed_url = https://repos.fedorapeople.org/pulp/pulp/fixtures/file/PULP_MANIFEST

This issue is to impove the exception handling, because it was tricky to debug.

Some notes:

  • os.path.basename returns "" when passed a string that ends with "/"
  • os.makedirs ignores the working directory when passed a string that starts with "/"
  • the combination of ^ means that using WRONG feed_url results in a PermissionsError, trying to write to /pulp/pulp/fixtures/file/

Also available in: Atom PDF