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 621B

12345678910111213141516171819202122
  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. _type_conf_name = 'ui'
  13. def __init__(self, name):
  14. if InterfacePlugin._instance is not None:
  15. raise PluginError("Maximum one interface allowed")
  16. super().__init__(name)
  17. self._instance = self