comparison sat/core/xmpp.py @ 3125:c3ce8c997fdf

plugin android: reconnect profiles with autoconnect if network is activated: if network is activated, we check that all profiles with autoconnect are indeed connected, and reconnect them if necesssary.
author Goffi <goffi@goffi.org>
date Sun, 26 Jan 2020 18:08:09 +0100
parents aa728dc7b0ce
children b9395c4df8b9
comparison
equal deleted inserted replaced
3124:b86060901278 3125:c3ce8c997fdf
343 connector = self._saved_connector 343 connector = self._saved_connector
344 network_disabled = self._network_disabled 344 network_disabled = self._network_disabled
345 except AttributeError: 345 except AttributeError:
346 # connection has not been stopped by networkDisabled 346 # connection has not been stopped by networkDisabled
347 # we don't have to restart it 347 # we don't have to restart it
348 log.debug("no connection to restart") 348 log.debug(f"no connection to restart [{self.profile}]")
349 return 349 return
350 else: 350 else:
351 del self._network_disabled 351 del self._network_disabled
352 if not network_disabled: 352 if not network_disabled:
353 raise exceptions.InternalError("network_disabled should be True") 353 raise exceptions.InternalError("network_disabled should be True")