Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bliss
python-handel
Commits
ed34e67d
Commit
ed34e67d
authored
Jul 03, 2018
by
Vincent Michel
Browse files
Add a version check (handel >= 1.2.19) and a user warning
parent
0f5e36fe
Changes
1
Show whitespace changes
Inline
Side-by-side
handel/interface.py
View file @
ed34e67d
...
...
@@ -3,6 +3,7 @@
from
__future__
import
absolute_import
import
os
import
warnings
from
functools
import
reduce
import
numpy
...
...
@@ -37,8 +38,8 @@ __all__ = ['init', 'init_handel', 'exit',
'get_master_channels'
,
'get_trigger_channels'
,
'set_acquisition_value'
,
'get_acquisition_value'
,
'remove_acquisition_value'
,
'apply_acquisition_values'
,
'get_handel_version'
,
'
get_config_files'
,
'get_config
'
]
'get_handel_version'
,
'get_config_files'
,
'get_config'
,
'
HandelError
'
]
MAX_STRING_LENGTH
=
80
...
...
@@ -681,3 +682,13 @@ def get_config(*path):
filename
=
os
.
path
.
join
(
*
path
)
with
open
(
filename
)
as
f
:
return
parse_xia_ini_file
(
f
.
read
())
# Check version at import time
if
get_handel_version
()
<
(
1
,
2
,
19
):
print
(
get_handel_version
())
warnings
.
warn
(
"""
\
The current handel version is older than 1.2.19.
This might cause bugs, especially with the FalconX.
Please consider upgrading to a more recent version."""
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment