Don't try to stop a non-started Client

This commit is contained in:
Dan 2018-04-03 14:54:34 +02:00
parent 10452dc545
commit fcf0e4515f

View File

@ -245,6 +245,9 @@ class Client:
"""Use this method to manually stop the Client.
Requires no parameters.
"""
if not self.is_started:
raise ConnectionError("Client is already stopped")
self.is_started = False
self.session.stop()