power/mfi_mpower: Fix url handling in get_credentials#1925
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes get_credentials() so that when a URL contains embedded username:password@, the returned base_url correctly strips the credentials while still returning them in the credentials dict. This aligns the driver’s behavior with the intended flow: credentials are used for login, but are not retained in the base URL used for subsequent requests.
Changes:
- Assign the result of
urlparse(...)._replace(...)back tobase_urlso the updated netloc is preserved. - Ensure
get_credentials()returns a credential-freebase_urlwhen credentials are provided in the input URL.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1925 +/- ##
======================================
Coverage 61.0% 61.0%
======================================
Files 182 182
Lines 14848 14848
======================================
Hits 9067 9067
Misses 5781 5781
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Signed-off-by: Maciej Grela <enki@fsck.pl>
22f9500 to
e189aeb
Compare
Description
Before:
After:
Checklist