# HG changeset patch # User Goffi # Date 1618402190 -7200 # Node ID 6f7486683e20aebcc501c03e8b1562f9e2e2c2e4 # Parent b5bed164dce019f69b759cbb1a38c2117797dfcc 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) diff -r b5bed164dce0 -r 6f7486683e20 sat/__init__.py --- a/sat/__init__.py Thu Apr 01 13:57:20 2021 +0200 +++ b/sat/__init__.py Wed Apr 14 14:09:50 2021 +0200 @@ -1,6 +1,5 @@ #!/usr/bin/env python3 - # Libervia: an XMPP client # Copyright (C) 2009-2021 Jérôme Poisson (goffi@goffi.org) @@ -17,11 +16,12 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . import os.path +from sat_tmp import wokkel version_file = os.path.join(os.path.dirname(__file__), "VERSION") -try: - with open(version_file) as f: - __version__ = f.read().strip() -except NotImplementedError: - # pyjamas workaround - __version__ = "0.7.0D" +with open(version_file) as f: + __version__ = f.read().strip() + +if not wokkel.installed: + print("installing Wokkel patches") + wokkel.install()