Skip to content

Fix AttributeError in domains.list() for accounts with no domains#11

Open
SAY-5 wants to merge 1 commit into
adriangalilea:mainfrom
SAY-5:fix-empty-account-navigation
Open

Fix AttributeError in domains.list() for accounts with no domains#11
SAY-5 wants to merge 1 commit into
adriangalilea:mainfrom
SAY-5:fix-empty-account-navigation

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jul 18, 2026

Copy link
Copy Markdown

Fixes #10.

domains.list() crashes on any account with zero domains because Namecheap returns a self-closing <DomainGetListResult />, which xmltodict parses as None. The path walk in base.py then called .get() on that None. Guarding each segment with (result or {}) lets it fall through to the existing empty-result branch and return [].

I pulled the walk into a small navigate_path helper and added a base_check.py boundary check alongside it, covering the empty-account case plus the normal and missing-key paths.

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
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.

domains.list() crashes with AttributeError on accounts with zero domains

1 participant