Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC TDC 1ns 5cha
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC TDC 1ns 5cha
Commits
2c7cfae3
Commit
2c7cfae3
authored
Apr 28, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py: close device on __del__ without checking tkn
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
a54a3546
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
PyFmcTdc.py
lib/PyFmcTdc/PyFmcTdc/PyFmcTdc.py
+1
-3
No files found.
lib/PyFmcTdc/PyFmcTdc/PyFmcTdc.py
View file @
2c7cfae3
...
...
@@ -145,7 +145,6 @@ class FmcTdc(object):
self
.
libfmctdc
.
fmctdc_flush
(
self
.
tkn
,
self
.
idx
)
def
__init__
(
self
,
devid
):
self
.
tkn
=
None
if
devid
is
None
:
raise
Exception
(
"Invalid device ID"
)
self
.
__init_library
()
...
...
@@ -160,8 +159,7 @@ class FmcTdc(object):
self
.
chan
.
append
(
self
.
FmcTdcChannel
(
self
.
libfmctdc
,
self
.
tkn
,
i
))
def
__del__
(
self
):
if
self
.
tkn
is
not
None
:
self
.
libfmctdc
.
fmctdc_close
(
self
.
tkn
)
self
.
libfmctdc
.
fmctdc_close
(
self
.
tkn
)
self
.
libfmctdc
.
fmctdc_exit
()
def
__init_library
(
self
):
...
...
Write
Preview
Markdown
is supported
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