1
0
mirror of https://github.com/gryf/wicd.git synced 2026-03-15 14:13:42 +01:00

Fix some minor formatting issues

Don't save wired profiles that have only whitespace in their names.
This commit is contained in:
Dan O'Reilly
2009-08-01 18:57:00 -04:00
parent 6e132f1028
commit d684bac0ab

View File

@@ -1506,8 +1506,10 @@ class WiredDaemon(dbus.service.Object):
if not self.config.has_option(prof, script): if not self.config.has_option(prof, script):
self.config.set(prof, script, None) self.config.set(prof, script, None)
if profilename == "": profilename = profilename.strip()
if not profilename:
self.config.write() self.config.write()
print "Warning: Bad wired profile name given, ignoring."
return "500: Bad Profile name" return "500: Bad Profile name"
if self.debug_mode: if self.debug_mode:
print "saving wired profile %s" % profilename print "saving wired profile %s" % profilename