mirror of
https://github.com/gryf/wicd.git
synced 2025-12-21 21:38:06 +01:00
Fixed a malformed ''.join() call in daemon.py
Replaced a couple of concatenations with ''.join() calls.
This commit is contained in:
11
daemon.py
11
daemon.py
@@ -938,7 +938,6 @@ class ConnectionWizard(dbus.service.Object):
|
|||||||
@dbus.service.method('org.wicd.daemon.config')
|
@dbus.service.method('org.wicd.daemon.config')
|
||||||
def CreateWiredNetworkProfile(self, profilename):
|
def CreateWiredNetworkProfile(self, profilename):
|
||||||
""" Creates a wired network profile. """
|
""" Creates a wired network profile. """
|
||||||
#should include: profilename, ip, netmask, gateway, dns1, dns2, dns3
|
|
||||||
profilename = misc.to_unicode(profilename)
|
profilename = misc.to_unicode(profilename)
|
||||||
print "creating profile for " + profilename
|
print "creating profile for " + profilename
|
||||||
config = ConfigParser.ConfigParser()
|
config = ConfigParser.ConfigParser()
|
||||||
@@ -971,7 +970,7 @@ class ConnectionWizard(dbus.service.Object):
|
|||||||
for profile in profileList:
|
for profile in profileList:
|
||||||
print "profile = ", profile
|
print "profile = ", profile
|
||||||
if config.has_option(profile, "lastused"):
|
if config.has_option(profile, "lastused"):
|
||||||
if config.get(profile, "lastused") == "True":
|
if misc.to_bool(config.get(profile, "lastused")):
|
||||||
print "removing existing lastused"
|
print "removing existing lastused"
|
||||||
config.set(profile, "lastused", False)
|
config.set(profile, "lastused", False)
|
||||||
self.SaveWiredNetworkProfile(profile)
|
self.SaveWiredNetworkProfile(profile)
|
||||||
@@ -1008,7 +1007,7 @@ class ConnectionWizard(dbus.service.Object):
|
|||||||
profileList = config.sections()
|
profileList = config.sections()
|
||||||
for profile in profileList:
|
for profile in profileList:
|
||||||
if config.has_option(profile,"lastused"):
|
if config.has_option(profile,"lastused"):
|
||||||
if config.get(profile,"lastused") == "True":
|
if misc.to_bool(config.get(profile,"lastused")):
|
||||||
return profile
|
return profile
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@@ -1110,8 +1109,8 @@ class ConnectionWizard(dbus.service.Object):
|
|||||||
return
|
return
|
||||||
cur_network = self.LastScan[id]
|
cur_network = self.LastScan[id]
|
||||||
essid_key = "essid:" + cur_network["essid"]
|
essid_key = "essid:" + cur_network["essid"]
|
||||||
print ''.join("setting network option ", str(option), " to ",
|
print ''.join(["setting network option ", str(option), " to ",
|
||||||
str(cur_network[option]))
|
str(cur_network[option])])
|
||||||
config = ConfigParser.ConfigParser()
|
config = ConfigParser.ConfigParser()
|
||||||
config.read(self.wireless_conf)
|
config.read(self.wireless_conf)
|
||||||
|
|
||||||
@@ -1235,7 +1234,7 @@ class ConnectionWizard(dbus.service.Object):
|
|||||||
|
|
||||||
if config.has_option(section, option):
|
if config.has_option(section, option):
|
||||||
ret = config.get(section, option)
|
ret = config.get(section, option)
|
||||||
print 'found ' + option + ' in configuration', ret
|
print ''.join(['found ', option, ' in configuration ', ret])
|
||||||
else:
|
else:
|
||||||
config.set(section, option, default)
|
config.set(section, option, default)
|
||||||
ret = default
|
ret = default
|
||||||
|
|||||||
6
gui.py
6
gui.py
@@ -580,6 +580,8 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
|
|||||||
|
|
||||||
if wireless.GetWirelessProperty(networkID, 'use_settings_globally'):
|
if wireless.GetWirelessProperty(networkID, 'use_settings_globally'):
|
||||||
self.chkbox_global_settings.set_active(True)
|
self.chkbox_global_settings.set_active(True)
|
||||||
|
else:
|
||||||
|
self.chkbox_global_settings.set_active(False)
|
||||||
|
|
||||||
def format_entry(self, networkid, label):
|
def format_entry(self, networkid, label):
|
||||||
""" Helper method for fetching/formatting wireless properties. """
|
""" Helper method for fetching/formatting wireless properties. """
|
||||||
@@ -1614,8 +1616,8 @@ class appGui:
|
|||||||
|
|
||||||
# First make sure all the Addresses entered are valid.
|
# First make sure all the Addresses entered are valid.
|
||||||
if entry.chkbox_static_ip.get_active():
|
if entry.chkbox_static_ip.get_active():
|
||||||
for ent in [entry.txt_ip, entry.txt_netmask, entry.txt_gateway]:
|
enlist = [ent for ent in [entry.txt_ip, entry.txt_netmask,
|
||||||
entlist.append(ent)
|
entry.txt_gateway]]
|
||||||
|
|
||||||
if entry.chkbox_static_dns.get_active() and \
|
if entry.chkbox_static_dns.get_active() and \
|
||||||
not entry.chkbox_global_dns.get_active():
|
not entry.chkbox_global_dns.get_active():
|
||||||
|
|||||||
Reference in New Issue
Block a user