No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

interface.py 593B

1234567891011121314151617181920
  1. from .plugins import Plugin
  2. from .exceptions import *
  3. from lodel.settings.validator import SettingValidator
  4. class InterfacePlugin(Plugin):
  5. ##@brief Singleton instance storage
  6. _instance = None
  7. _plist_confspecs = {
  8. 'section': 'lodel2',
  9. 'key': 'interface',
  10. 'default': None,
  11. 'validator': SettingValidator('strip', none_is_valid = True)}
  12. def __init__(self, name):
  13. if InterfacePlugin._instance is not None:
  14. raise PluginError("Maximum one interface allowed")
  15. super().__init__(name)
  16. self._instance = self