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()