diff options
author | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2020-01-30 11:46:45 +0100 |
---|---|---|
committer | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2020-01-30 11:46:45 +0100 |
commit | 33ed2a64c92b0311ae35456c016eb284e426afc2 (patch) | |
tree | dc8276b74bebc11128d67240eb5906c9d35d8a6f /silx/app | |
parent | 5d647cf9a6159afd2933da594b9c79ad93d3cd9b (diff) |
New upstream version 0.12.0+dfsg
Diffstat (limited to 'silx/app')
-rw-r--r-- | silx/app/view/main.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/silx/app/view/main.py b/silx/app/view/main.py index 90b8b17..8139175 100644 --- a/silx/app/view/main.py +++ b/silx/app/view/main.py @@ -1,6 +1,6 @@ # coding: utf-8 # /*########################################################################## -# Copyright (C) 2016-2018 European Synchrotron Radiation Facility +# Copyright (C) 2016-2019 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -27,10 +27,11 @@ __authors__ = ["V. Valls"] __license__ = "MIT" __date__ = "17/01/2019" -import sys import argparse import logging +import os import signal +import sys _logger = logging.getLogger(__name__) @@ -61,6 +62,12 @@ def createParser(): action="store_true", default=False, help='Start the application using new fresh user preferences') + parser.add_argument( + '--hdf5-file-locking', + dest="hdf5_file_locking", + action="store_true", + default=False, + help='Start the application with HDF5 file locking enabled (it is disabled by default)') return parser @@ -73,6 +80,11 @@ def mainQt(options): # Import most of the things here to be sure to use the right logging level # + # This needs to be done prior to load HDF5 + hdf5_file_locking = 'TRUE' if options.hdf5_file_locking else 'FALSE' + _logger.info('Set HDF5_USE_FILE_LOCKING=%s', hdf5_file_locking) + os.environ['HDF5_USE_FILE_LOCKING'] = hdf5_file_locking + try: # it should be loaded before h5py import hdf5plugin # noqa |