summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-10-22 19:46:31 +0200
committerDaniel Friesel <derf@finalrewind.org>2022-10-22 19:46:31 +0200
commit73c04abd97dff11302a272fbf9ab158d06738d5e (patch)
tree6acd79f600d2520072a28a9580484ccaaa000c4c
parent4cef8dd59c45c4f33b62afc81261d10f9f642086 (diff)
get voltage/current: catch ValueError as well
-rwxr-xr-xbin/korad-logger4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/korad-logger b/bin/korad-logger
index fea5a24..98cd922 100755
--- a/bin/korad-logger
+++ b/bin/korad-logger
@@ -220,13 +220,13 @@ class KA320:
def get_voltage(self, plot=None):
try:
return float(self.rw(f"VOUT{self.channel:d}?".encode(), 5, True, plot=plot))
- except TypeError:
+ except (TypeError, ValueError):
return None
def get_current(self, plot=None):
try:
return float(self.rw(f"IOUT{self.channel:d}?".encode(), 5, True, plot=plot))
- except TypeError:
+ except (TypeError, ValueError):
return None
def set_output(self, enable):