Unverified Commit 73c04abd authored by Daniel Friesel's avatar Daniel Friesel
Browse files

get voltage/current: catch ValueError as well

parent 4cef8dd5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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):