From 1f0fe18201b71f39f9ac7acfb69ace753deb87ee Mon Sep 17 00:00:00 2001 From: kozec Date: Tue, 27 Jan 2015 09:28:32 +0100 Subject: [PATCH] Fix: None can't be used as parameter to emit() --- syncthing_gtk/daemon.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/syncthing_gtk/daemon.py b/syncthing_gtk/daemon.py index 2aff7e20..8f12d861 100644 --- a/syncthing_gtk/daemon.py +++ b/syncthing_gtk/daemon.py @@ -692,7 +692,7 @@ def _syncthing_cb_shutdown(self, data, reason): if self._connected: self._connected = False self._epoch += 1 - self.emit("disconnected", reason, None) + self.emit("disconnected", reason, "") self.cancel_all() def _init_event_pooling(self, events): @@ -881,7 +881,8 @@ def _syncthing_cb_version_known(self, version): # Syncting version too low. Cancel everything and report error self.cancel_all() self._epoch += 1 - self.emit("connection-error", Daemon.OLD_VERSION, "", None) + msg = "daemon is too old" + self.emit("connection-error", Daemon.OLD_VERSION, msg, Exception(msg)) return if self._my_id != None: device = self._get_device_data(self._my_id)