*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 36d5c0e3 authored by Schabbauer, Johannes's avatar Schabbauer, Johannes
Browse files

-small bugfix in destructor

parent b53b3f82
No related branches found
No related tags found
1 merge request!2Added new spectrum awg card.
......@@ -22,7 +22,7 @@ class SpectrumCard:
"""
Destructor method to ensure the connection is closed when the class instance is destroyed.
"""
self.close() # Call the close method to safely close the connection if it's still open
self.card_close() # Call the close method to safely close the connection if it's still open
def open(self):
......@@ -804,8 +804,9 @@ class SpectrumCard:
"""
Closes handle to the card.
"""
spcm_vClose(self.hCard)
self.hCard = None
if self.hCard is not None:
spcm_vClose(self.hCard)
self.hCard = None
def transfer_single_replay_samples(self, samples):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment