From 73c04abd97dff11302a272fbf9ab158d06738d5e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 22 Oct 2022 19:46:31 +0200 Subject: get voltage/current: catch ValueError as well --- bin/korad-logger | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') 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): -- cgit v1.2.3