From 73af35e60eee0ad96c26a23bc4b761cd27f11518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Sat, 13 Feb 2016 22:02:58 +0000 Subject: Make the ConnectionFailed exception more generic. --- glucometerutils/exceptions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glucometerutils/exceptions.py b/glucometerutils/exceptions.py index 3e73048..82f8013 100644 --- a/glucometerutils/exceptions.py +++ b/glucometerutils/exceptions.py @@ -16,8 +16,8 @@ class Error(Exception): class ConnectionFailed(Error): """It was not possible to connect to the meter.""" - def __init__(self): - self.message = 'Unable to connect to the meter.' + def __init__(self, message='Unable to connect to the meter.'): + self.message = message class InvalidResponse(Error): -- cgit v1.2.3