comparison sat/__init__.py @ 2607:4c086cf7af66

core (version): added workaround for Pyjamas, avoiding crash when reading VERSION
author Goffi <goffi@goffi.org>
date Sun, 03 Jun 2018 13:54:35 +0200
parents 4aca060075b7
children 56f94936df1e
comparison
equal deleted inserted replaced
2606:6a261b725f71 2607:4c086cf7af66
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 import os.path 19 import os.path
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 with open(version_file) as f: 22 try:
23 __version__ = f.read().strip() 23 with open(version_file) as f:
24 __version__ = f.read().strip()
25 except NotImplementedError:
26 # pyjamas workaround
27 __version__ = '0.7D'