mirror of
https://github.com/gryf/wicd.git
synced 2026-04-20 21:01:25 +02:00
Fix some minor formatting issues
Don't save wired profiles that have only whitespace in their names.
This commit is contained in:
+3
-1
@@ -1506,8 +1506,10 @@ class WiredDaemon(dbus.service.Object):
|
||||
if not self.config.has_option(prof, script):
|
||||
self.config.set(prof, script, None)
|
||||
|
||||
if profilename == "":
|
||||
profilename = profilename.strip()
|
||||
if not profilename:
|
||||
self.config.write()
|
||||
print "Warning: Bad wired profile name given, ignoring."
|
||||
return "500: Bad Profile name"
|
||||
if self.debug_mode:
|
||||
print "saving wired profile %s" % profilename
|
||||
|
||||
Reference in New Issue
Block a user