Merge lp:~josejuan05/parcel-tracker/trunk into lp:parcel-tracker
Status: | Merged |
---|---|
Merged at revision: | 507 |
Proposed branch: | lp:~josejuan05/parcel-tracker/trunk |
Merge into: | lp:parcel-tracker |
Diff against target: |
26 lines (+9/-1) 1 file modified
parcel_tracker_lib/postservices/uspscom.py (+9/-1) |
To merge this branch: | bzr merge lp:~josejuan05/parcel-tracker/trunk |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vsevolod Velichko | Approve | ||
Review via email: mp+340570@code.launchpad.net |
Description of the change
USPS postservice has been failing for me for the past several months. It looks like a problem where if the user hits an Akamai endpoint without having cookies enabled the Akamai server returns a 403(?) error.
I enabled cookies and it solved the problem except for one tracking number (where a location wasn't returned for one of the tracking numbers (94001116990004
For that number USPS returned a status but not a location, so the parsing code (which splits the result on a newline and uses the first line as the status and the second line as the location) failed because there was no newline, hence there was no second array entry. The proposed code change isn't beautiful, and I'd gladly accept a better solution.
Great, thanks for your patch. Merged into 18.03.1