mirror of
https://github.com/gryf/wicd.git
synced 2026-02-24 11:15:49 +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):
|
def write(self):
|
||||||
""" Writes the loaded config file to disk. """
|
""" 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')
|
configfile = open(self.config_file, 'w')
|
||||||
RawConfigParser.write(self, configfile)
|
RawConfigParser.write(self, configfile)
|
||||||
configfile.close()
|
configfile.close()
|
||||||
|
|||||||
@@ -1446,6 +1446,8 @@ class WiredDaemon(dbus.service.Object):
|
|||||||
@dbus.service.method('org.wicd.daemon.wired')
|
@dbus.service.method('org.wicd.daemon.wired')
|
||||||
def CreateWiredNetworkProfile(self, profilename, default=False):
|
def CreateWiredNetworkProfile(self, profilename, default=False):
|
||||||
""" Creates a wired network profile. """
|
""" Creates a wired network profile. """
|
||||||
|
if not profilename:
|
||||||
|
return False
|
||||||
profilename = misc.to_unicode(profilename)
|
profilename = misc.to_unicode(profilename)
|
||||||
print "Creating wired profile for " + profilename
|
print "Creating wired profile for " + profilename
|
||||||
if self.config.has_section(profilename):
|
if self.config.has_section(profilename):
|
||||||
|
|||||||
Reference in New Issue
Block a user