File: failp.py

package info (click to toggle)
errbot 6.1.7%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 3,712 kB
  • sloc: python: 13,831; makefile: 164; sh: 97
file content (13 lines) | stat: -rw-r--r-- 335 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
from errbot import BotPlugin, ValidationException


class FailP(BotPlugin):
    """
    Just a plugin failing at config time.
    """

    def get_configuration_template(self):
        return {"One": 1, "Two": 2}

    def check_configuration(self, configuration):
        raise ValidationException("Message explaining why it failed.")