eric7/PluginManager/PluginRepositoryDialog.py

branch
eric7
changeset 8663
a925267d1545
parent 8651
ce4c3c401482
child 8881
54e42bc2437a
equal deleted inserted replaced
8662:49781769bc43 8663:a925267d1545
200 Preferences.getUI("DynamicOnlineCheck") and 200 Preferences.getUI("DynamicOnlineCheck") and
201 QNetworkInformation.load(QNetworkInformation.Feature.Reachability) 201 QNetworkInformation.load(QNetworkInformation.Feature.Reachability)
202 ): 202 ):
203 self.__reachabilityChanged( 203 self.__reachabilityChanged(
204 QNetworkInformation.instance().reachability()) 204 QNetworkInformation.instance().reachability())
205 # TODO: remove this 'contextlib' with official release 205 QNetworkInformation.instance().reachabilityChanged.connect(
206 import contextlib 206 self.__reachabilityChanged)
207 with contextlib.suppress(Exception):
208 QNetworkInformation.instance().reachabilityChanged.connect(
209 self.__reachabilityChanged)
210 else: 207 else:
211 # assume to be 'always online' if no backend could be loaded or 208 # assume to be 'always online' if no backend could be loaded or
212 # dynamic online check is switched of 209 # dynamic online check is switched of
213 self.__reachabilityChanged(QNetworkInformation.Reachability.Online) 210 self.__reachabilityChanged(QNetworkInformation.Reachability.Online)
214 211

eric ide

mercurial