Mercurial > sat_tmp
comparison sat_tmp/wokkel/__init__.py @ 77:0f2536ae968f
wokkel: new "installed" boolean, set to True when patches are applied
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 14 Apr 2021 14:07:02 +0200 |
parents | 67508db07ea0 |
children |
comparison
equal
deleted
inserted
replaced
76:67508db07ea0 | 77:0f2536ae968f |
---|---|
15 # GNU Affero General Public License for more details. | 15 # GNU Affero General Public License for more details. |
16 | 16 |
17 # You should have received a copy of the GNU Affero General Public License | 17 # You should have received a copy of the GNU Affero General Public License |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
20 installed = False | |
20 | 21 |
21 def install(): | 22 def install(): |
22 """Monkey patch Wokkel to have improvments implemented here""" | 23 """Monkey patch Wokkel to have improvments implemented here""" |
23 from twisted.python import compat | 24 global installed |
24 compat._PY3 = True | 25 if not installed: |
25 import wokkel | 26 from twisted.python import compat |
26 from . import pubsub, rsm, mam, data_form | 27 compat._PY3 = True |
27 wokkel.pubsub = pubsub | 28 import wokkel |
28 wokkel.rsm = rsm | 29 from . import pubsub, rsm, mam, data_form |
29 wokkel.mam = mam | 30 wokkel.pubsub = pubsub |
30 data_form.install() | 31 wokkel.rsm = rsm |
32 wokkel.mam = mam | |
33 data_form.install() | |
34 installed = True |