1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-26 16:32:34 +01:00

Don't duplicate code

This commit is contained in:
David Paleino
2011-12-08 13:23:29 +01:00
parent ef54b61cb3
commit 6adb75f821

View File

@@ -66,9 +66,9 @@ if __name__ == '__main__':
misc.RenameProcess("wicd")
wireless_conf = wpath.etc + "wireless-settings.conf"
wired_conf = wpath.etc + "wired-settings.conf"
dhclient_conf = wpath.etc + "dhclient.conf.template"
wireless_conf = os.path.join(wpath.etc, "wireless-settings.conf")
wired_conf = os.path.join(wpath.etc, "wired-settings.conf")
dhclient_conf = os.path.join(wpath.etc, "dhclient.conf.template")
class WicdDaemon(dbus.service.Object):
""" The main wicd daemon class.
@@ -944,9 +944,7 @@ class WirelessDaemon(dbus.service.Object):
self._debug_mode = debug
self._scanning = False
self.LastScan = []
self.config = ConfigManager(os.path.join(wpath.etc,
"wireless-settings.conf"),
debug=debug)
self.config = ConfigManager(wireless_conf, debug=debug)
def get_debug_mode(self):
return self._debug_mode
@@ -1355,9 +1353,7 @@ class WiredDaemon(dbus.service.Object):
self._debug_mode = debug
self._cur_wired_prof_name = ""
self.WiredNetwork = {}
self.config = ConfigManager(os.path.join(wpath.etc,
"wired-settings.conf"),
debug=debug)
self.config = ConfigManager(wired_conf, debug=debug)
def get_debug_mode(self):
return self._debug_mode