소스 검색

Forgotten file

Yann Weber 7 년 전
부모
커밋
180e41a657
1개의 변경된 파일20개의 추가작업 그리고 0개의 파일을 삭제
  1. 20
    0
      lodel/plugin/interface.py

+ 20
- 0
lodel/plugin/interface.py 파일 보기

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

Loading…
취소
저장