From 0d3b6fe780c922ae92421289d77fbbcae70d6666 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Fri, 27 Mar 2015 11:13:47 -0700 Subject: [PATCH] Python3-friendly fix for the optional SSL stuff in the thread. --- alarmdecoder/devices.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/alarmdecoder/devices.py b/alarmdecoder/devices.py index 3c10af8..9012397 100644 --- a/alarmdecoder/devices.py +++ b/alarmdecoder/devices.py @@ -40,8 +40,16 @@ try: have_openssl = True except ImportError: - from collections import namedtuple - SSL = namedtuple('SSL', ['Error', 'WantReadError', 'SysCallError']) + class SSL: + class Error(BaseException): + pass + + class WantReadError(BaseException): + pass + + class SysCallError(BaseException): + pass + have_openssl = False