From f3bf4ffc8c7a2498fbd6c8374c1d603deb933ea4 Mon Sep 17 00:00:00 2001 From: "Christian T. Jacobs" Date: Sun, 2 Jul 2017 14:54:42 +0100 Subject: [PATCH] Also handle ValueErrors when converting the frequency. This also handles the case of an empty frequency field. --- pyqso/record_dialog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyqso/record_dialog.py b/pyqso/record_dialog.py index a6f854a..6826982 100644 --- a/pyqso/record_dialog.py +++ b/pyqso/record_dialog.py @@ -490,7 +490,7 @@ class RecordDialog: if(not isinstance(frequency, float)): try: frequency = float(frequency) - except TypeError: + except(ValueError, TypeError): logging.exception("Could not convert frequency to a floating-point value.") return frequency # Do not bother scaling if the units are the same.