mirror of
https://github.com/gryf/wicd.git
synced 2026-01-09 07:14:13 +01:00
Enforce valid wired profile names at the GUI level.
This commit is contained in:
@@ -655,17 +655,16 @@ class WiredNetworkEntry(NetworkEntry):
|
||||
|
||||
def add_profile(self, widget):
|
||||
""" Add a profile to the profile list. """
|
||||
print "adding profile"
|
||||
|
||||
response = string_input("Enter a profile name", "The profile name " +
|
||||
"will not be used by the computer. It " +
|
||||
"allows you to " +
|
||||
"easily distinguish between different network " +
|
||||
"profiles.", "Profile name:")
|
||||
"profiles.", "Profile name:").strip()
|
||||
|
||||
# if response is "" or None
|
||||
if not response:
|
||||
return
|
||||
error(None, "Invalid profile name", block=True)
|
||||
return False
|
||||
|
||||
profile_name = response
|
||||
profile_list = wired.GetWiredProfileList()
|
||||
|
||||
Reference in New Issue
Block a user