Mercurial > libervia-backend
comparison sat/__init__.py @ 3495:6f7486683e20
core: apply wokkel patches if they are not already:
this case may happen if a sat module is used without the backend being launched (e.g. in
tests)
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 14 Apr 2021 14:09:50 +0200 |
parents | 7550ae9cfbac |
children | c018c510a562 |
comparison
equal
deleted
inserted
replaced
3494:b5bed164dce0 | 3495:6f7486683e20 |
---|---|
1 #!/usr/bin/env python3 | 1 #!/usr/bin/env python3 |
2 | |
3 | 2 |
4 # Libervia: an XMPP client | 3 # Libervia: an XMPP client |
5 # Copyright (C) 2009-2021 Jérôme Poisson (goffi@goffi.org) | 4 # Copyright (C) 2009-2021 Jérôme Poisson (goffi@goffi.org) |
6 | 5 |
7 # This program is free software: you can redistribute it and/or modify | 6 # This program is free software: you can redistribute it and/or modify |
15 # GNU Affero General Public License for more details. | 14 # GNU Affero General Public License for more details. |
16 | 15 |
17 # You should have received a copy of the GNU Affero General Public License | 16 # 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/>. | 17 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 import os.path | 18 import os.path |
19 from sat_tmp import wokkel | |
20 | 20 |
21 version_file = os.path.join(os.path.dirname(__file__), "VERSION") | 21 version_file = os.path.join(os.path.dirname(__file__), "VERSION") |
22 try: | 22 with open(version_file) as f: |
23 with open(version_file) as f: | 23 __version__ = f.read().strip() |
24 __version__ = f.read().strip() | 24 |
25 except NotImplementedError: | 25 if not wokkel.installed: |
26 # pyjamas workaround | 26 print("installing Wokkel patches") |
27 __version__ = "0.7.0D" | 27 wokkel.install() |