Thanks to Frank Hofmann for the right pointer to
https://stackoverflow.com/questions/47838405/porting-a-sub-class-of-python2-file-class-to-python3
Now at least "/usr/sbin/wicd -c -f -e -o" keeps running.
Still throws errors and warnings, though:
/usr/share/wicd/daemon/wicd-daemon.py:1925: PyGIDeprecationWarning: GObject.MainLoop is deprecated; use GLib.MainLoop instead
mainloop = gobject.MainLoop()
/usr/share/wicd/daemon/monitor.py:392: PyGIDeprecationWarning: GObject.MainLoop is deprecated; use GLib.MainLoop instead
mainloop = gobject.MainLoop()
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/share/wicd/daemon/wicd-daemon.py", line 1020, in _async_scan
self._sync_scan()
File "/usr/share/wicd/daemon/wicd-daemon.py", line 1024, in _sync_scan
scan = self.wifi.Scan(str(self.hidden_essid))
File "/usr/lib/python3/dist-packages/wicd/networking.py", line 673, in Scan
aps = wiface.GetNetworks(essid)
File "/usr/lib/python3/dist-packages/wicd/wnettools.py", line 227, in newfunc
return func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/wicd/wnettools.py", line 1392, in GetNetworks
entry = self._ParseAccessPoint(cell, ralink_info)
File "/usr/lib/python3/dist-packages/wicd/wnettools.py", line 1447, in _ParseAccessPoint
ap['bitrates'] = sorted(m, lambda x, y: int(float(x) - float(y)))
TypeError: sorted expected 1 arguments, got 2
Daemon still does not start. It fails as follows:
Traceback (most recent call last):
File "/usr/share/wicd/daemon/wicd-daemon.py", line 62, in <module>
from wicd.logfile import ManagedStdio
File "/usr/lib/python3/dist-packages/wicd/logfile.py", line 32, in <module>
class LogFile(file):
NameError: name 'file' is not defined
Thanks, Axel Beckert from Debian!
***
Symptom: Can't connect to WEP based networks with hexadecimal keys
due to unexpanded template variables like $_KEY in the actual
wpa_supplicant configurations.
Solution: Move the appending of the line outside the loop over all
matches in one line.
Author: Axel Beckert <abe@debian.org>
Bug-Debian: https://bugs.debian.org/812427
Bug: https://bugs.launchpad.net/wicd/+bug/1419464
When a user actives "automatic reconnnect" and then tries this out, he will be staring at the GUI interface, waiting for a reconnect.
But wicd-daemon refuses to reconnect when the GUI interface is open, and fails to reports this to the GUI user.
Hence users assume that this feature does not work properly (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=582567).
This commit fixes that by doing a reconnect, no matter whether the GUI is open or not, thus taking the path of "least surprise".
The original rationale for not reconnecting when the GUI is open was never stated in the comments, nor in the commit message.