diff options
-rwxr-xr-x | glucometerutils/glucometer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/glucometerutils/glucometer.py b/glucometerutils/glucometer.py index 14999a7..8cf2555 100755 --- a/glucometerutils/glucometer.py +++ b/glucometerutils/glucometer.py @@ -88,7 +88,8 @@ def main(): time_str = device.get_datetime() except exceptions.InvalidDateTime: time_str = 'INVALID' - except NotImplementedError, ValueError: # Catch any leftover ValueError + # Also catch any leftover ValueErrors. + except (NotImplementedError, ValueError): time_str = 'N/A' print("{device_info}Time: {time}".format( device_info=str(device_info), time=time_str)) |