ソースを参照

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

読み込み中…
キャンセル
保存