mirror of
https://github.com/gryf/wicd.git
synced 2026-01-03 12:24:14 +01:00
Fix annoying KeyError bug if no prior dhcp hostname has been set.
This commit is contained in:
@@ -448,6 +448,8 @@ class ConnectThread(threading.Thread):
|
||||
else:
|
||||
# Run dhcp...
|
||||
self.SetStatus('running_dhcp')
|
||||
if self.network.get('dhcphostname') == None:
|
||||
self.network['dhcphostname'] = os.uname()[1]
|
||||
print "Running DHCP with hostname",self.network["dhcphostname"]
|
||||
dhcp_status = iface.StartDHCP(self.network["dhcphostname"])
|
||||
if dhcp_status in ['no_dhcp_offers', 'dhcp_failed']:
|
||||
|
||||
Reference in New Issue
Block a user