The point is not to determine if a network interface is up, the point is to determine if the user has enabled his internet connection. And this is so that the news scheduler can suspend itself until the user re-enables the network connection. Otherwise scheduled downloads will fail and the scheduler will give up on them for the day.
If you dont want to use networkmanager, simply disable/uninstall it, then calibre will not use it to check for anything.
And I have no idea what you believe the code you've posted will accomplish? It will work even if only the loopback interface is up.
|