mirror of
https://github.com/gryf/wicd.git
synced 2026-04-20 21:01:25 +02:00
experimental:
- Some minor cleanup/formatting fixes - Add a missing DetectWiredInterfaces() method to networking.py
This commit is contained in:
+1
-3
@@ -1402,7 +1402,6 @@ def main(argv):
|
||||
sys.exit(2)
|
||||
|
||||
no_poll = False
|
||||
scan_interval = "120000"
|
||||
for o, a in opts:
|
||||
if o in ('-h', '--help'):
|
||||
usage()
|
||||
@@ -1437,8 +1436,7 @@ def main(argv):
|
||||
|
||||
gobject.threads_init()
|
||||
if not no_poll:
|
||||
(child_pid, x, x, x) = gobject.spawn_async([wpath.bin + "monitor.py",
|
||||
scan_interval],
|
||||
(child_pid, x, x, x) = gobject.spawn_async([wpath.bin + "monitor.py"],
|
||||
flags=gobject.SPAWN_CHILD_INHERITS_STDIN)
|
||||
signal.signal(signal.SIGTERM, sigterm_caught)
|
||||
|
||||
|
||||
+3
-3
@@ -417,9 +417,9 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
|
||||
box = LabelEntry(opts[x][0].replace('_',' '))
|
||||
box.set_auto_hidden(True)
|
||||
self.vbox_encrypt_info.pack_start(box)
|
||||
#add the data to any array, so that the information
|
||||
#can be easily accessed by giving the name of the wanted
|
||||
#data
|
||||
# Add the data to any array, so that the information
|
||||
# can be easily accessed by giving the name of the wanted
|
||||
# data.
|
||||
self.encryption_info[opts[x][1]] = box.entry
|
||||
|
||||
box.entry.set_text(noneToBlankString(
|
||||
|
||||
@@ -801,6 +801,13 @@ class Wired(Controller):
|
||||
self.connecting_thread.start()
|
||||
return True
|
||||
|
||||
def DetectWiredInterface(self):
|
||||
""" Attempts to automatically detect a wired interface. """
|
||||
try:
|
||||
return wnettools.GetWiredInterfaces()[0]
|
||||
except IndexError:
|
||||
return None
|
||||
|
||||
def GetIP(self, fast=False):
|
||||
""" Get the IP of the interface.
|
||||
|
||||
|
||||
@@ -273,8 +273,6 @@ class Interface(object):
|
||||
client = "pump"
|
||||
return client
|
||||
|
||||
print 'checking dhcp...'
|
||||
|
||||
if self.DHCP_CLIENT:
|
||||
dhcp_client = get_client_name(self.DHCP_CLIENT)
|
||||
dhcp_path = self._find_client_path(dhcp_client)
|
||||
|
||||
Reference in New Issue
Block a user