From bf24f8460be05bf50a4e91539d2716b78096114a Mon Sep 17 00:00:00 2001 From: Jonathan Harris Date: Sun, 31 Jan 2016 12:43:17 +0000 Subject: [PATCH] Fix for stopping proxy listener. Fixes #85. --- edproxy.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/edproxy.py b/edproxy.py index 3e3b2531..607bc59f 100644 --- a/edproxy.py +++ b/edproxy.py @@ -30,6 +30,7 @@ class _EDProxy: def __init__(self): + self.root = None self.lock = threading.Lock() self.addr = None self.port = None @@ -54,7 +55,8 @@ class _EDProxy: def stop(self): # Still listening, but stop callbacks - self.root.unbind_all('<>') + if self.root: + self.root.unbind_all('<>') def status(self): self.lock.acquire()