mirror of
https://github.com/gryf/wicd.git
synced 2026-01-05 21:34:16 +01:00
Still trying to get rid of this empty wired-settings.conf section bug.
This commit is contained in:
@@ -124,6 +124,9 @@ class ConfigManager(RawConfigParser):
|
||||
|
||||
def write(self):
|
||||
""" Writes the loaded config file to disk. """
|
||||
for section in self.sections():
|
||||
if not section:
|
||||
self.remove_section(section)
|
||||
configfile = open(self.config_file, 'w')
|
||||
RawConfigParser.write(self, configfile)
|
||||
configfile.close()
|
||||
|
||||
@@ -1446,6 +1446,8 @@ class WiredDaemon(dbus.service.Object):
|
||||
@dbus.service.method('org.wicd.daemon.wired')
|
||||
def CreateWiredNetworkProfile(self, profilename, default=False):
|
||||
""" Creates a wired network profile. """
|
||||
if not profilename:
|
||||
return False
|
||||
profilename = misc.to_unicode(profilename)
|
||||
print "Creating wired profile for " + profilename
|
||||
if self.config.has_section(profilename):
|
||||
|
||||
Reference in New Issue
Block a user