Skip to content
Snippets Groups Projects
Commit 12b45cc9 authored by Adam Williamson's avatar Adam Williamson Committed by Adam Williamson
Browse files

guess_namespace: drop odd fallback to default_namespaces


This fallback seems broken and weird. I can't see why:

1) We do it at all
2) Given that we do it, we do it only for namespace IDs in
   site.namespaces

It's existed since the first version of mwclient, but I really
can't see how it's valid. A `Site` instance's `self.namespaces`
starts out as `default_namespaces`, then in `site_init`, we read
in the real namespace configuration of the specific wiki. If the
wiki changes the default namespaces, we should respect that. So
it seems to me we should just trust `self.namespaces`. I don't
see how any kind of fallback to `self.default_namespaces` is ever
going to give a more useful result than not doing it.

Signed-off-by: default avatarAdam Williamson <awilliam@redhat.com>
parent 43925ff7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment