mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 04:48:00 +01:00
More Python 3 fixes needed to also install the packages
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
This commit is contained in:
@@ -707,7 +707,7 @@ class OptCols(urwid.WidgetWrap):
|
|||||||
# callbacks map the text contents to its assigned callback.
|
# callbacks map the text contents to its assigned callback.
|
||||||
self.callbacks = []
|
self.callbacks = []
|
||||||
for cmd in tuples:
|
for cmd in tuples:
|
||||||
key = reduce(lambda s, (f, t): s.replace(f, t), [
|
key = reduce(lambda s, tuple: s.replace(tuple[0], tuple[1]), [
|
||||||
('ctrl ', 'Ctrl+'), ('meta ', 'Alt+'),
|
('ctrl ', 'Ctrl+'), ('meta ', 'Alt+'),
|
||||||
('left', '<-'), ('right', '->'),
|
('left', '<-'), ('right', '->'),
|
||||||
('page up', 'Page Up'), ('page down', 'Page Down'),
|
('page up', 'Page Up'), ('page down', 'Page Down'),
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ import urwid
|
|||||||
# DBus communication stuff
|
# DBus communication stuff
|
||||||
from dbus import DBusException
|
from dbus import DBusException
|
||||||
# It took me a while to figure out that I have to use this.
|
# It took me a while to figure out that I have to use this.
|
||||||
import gobject
|
from gi.repository import GObject as gobject
|
||||||
|
|
||||||
# Other important wicd-related stuff
|
# Other important wicd-related stuff
|
||||||
from wicd import wpath
|
from wicd import wpath
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ Module containing the code for the main wicd GUI.
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import gobject
|
from gi.repository import GObject as gobject
|
||||||
import gtk
|
import gtk
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
from dbus import DBusException
|
from dbus import DBusException
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ handles recieving/sendings the settings from/to the daemon.
|
|||||||
#
|
#
|
||||||
|
|
||||||
import gtk
|
import gtk
|
||||||
import gobject
|
from gi.repository import GObject as gobject
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from wicd import misc
|
from wicd import misc
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class TrayIcon() -- Parent class of TrayIconGUI and IconConnectionInfo.
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
import gtk
|
import gtk
|
||||||
import gobject
|
from gi.repository import GObject as gobject
|
||||||
import getopt
|
import getopt
|
||||||
import os
|
import os
|
||||||
import pango
|
import pango
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ when appropriate.
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
import gobject
|
from gi.repository import GObject as gobject
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from dbus import DBusException
|
from dbus import DBusException
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ from subprocess import Popen
|
|||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
|
|
||||||
# DBUS
|
# DBUS
|
||||||
import gobject
|
from gi.repository import GObject as gobject
|
||||||
import dbus
|
import dbus
|
||||||
import dbus.service
|
import dbus.service
|
||||||
if getattr(dbus, 'version', (0, 0, 0)) < (0, 80, 0):
|
if getattr(dbus, 'version', (0, 0, 0)) < (0, 80, 0):
|
||||||
@@ -1950,5 +1950,7 @@ if __name__ == '__main__':
|
|||||||
print(("Root privileges are required for the daemon to run properly." +
|
print(("Root privileges are required for the daemon to run properly." +
|
||||||
" Exiting."))
|
" Exiting."))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
gobject.threads_init()
|
# No more needed since PyGObject 3.11, c.f.
|
||||||
|
# https://wiki.gnome.org/PyGObject/Threading
|
||||||
|
#gobject.threads_init()
|
||||||
main(sys.argv)
|
main(sys.argv)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ import dbus
|
|||||||
import socket, fcntl
|
import socket, fcntl
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
import wpath
|
from . import wpath
|
||||||
from . import misc
|
from . import misc
|
||||||
from .misc import find_path
|
from .misc import find_path
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user