A Python robot that edits Wikipedia and interacts with people over IRC https://en.wikipedia.org/wiki/User:EarwigBot
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

29 linhas
940 B

  1. # -*- coding: utf-8 -*-
  2. """
  3. EarwigBot's Wiki Toolset: Exceptions
  4. This module contains all exceptions used by the wiki.tools package.
  5. """
  6. class WikiToolsetError(Exception):
  7. """Base exception class for errors in the Wiki Toolset."""
  8. class SiteNotFoundError(WikiToolsetError):
  9. """A site matching the args given to get_site() could not be found in the
  10. config file."""
  11. class SiteAPIError(WikiToolsetError):
  12. """We couldn't connect to a site's API, perhaps because the server doesn't
  13. exist, our URL is wrong, or they're having temporary problems."""
  14. class LoginError(WikiToolsetError):
  15. """An error occured while trying to login. Perhaps the username/password is
  16. incorrect."""
  17. class NamespaceNotFoundError(WikiToolsetError):
  18. """A requested namespace name or namespace ID does not exist."""
  19. class UserNotFoundError(WikiToolsetError):
  20. """Attempting to get information about a user that does not exist."""