diff options
author | Daniel Friesel <derf@finalrewind.org> | 2022-10-22 19:46:31 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2022-10-22 19:46:31 +0200 |
commit | 73c04abd97dff11302a272fbf9ab158d06738d5e (patch) | |
tree | 6acd79f600d2520072a28a9580484ccaaa000c4c | |
parent | 4cef8dd59c45c4f33b62afc81261d10f9f642086 (diff) |
get voltage/current: catch ValueError as well
-rwxr-xr-x | bin/korad-logger | 4 |
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): |