mirror of
https://github.com/gryf/wicd.git
synced 2026-02-17 06:35:45 +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):
|
def add_profile(self, widget):
|
||||||
""" Add a profile to the profile list. """
|
""" Add a profile to the profile list. """
|
||||||
print "adding profile"
|
|
||||||
|
|
||||||
response = string_input("Enter a profile name", "The profile name " +
|
response = string_input("Enter a profile name", "The profile name " +
|
||||||
"will not be used by the computer. It " +
|
"will not be used by the computer. It " +
|
||||||
"allows you to " +
|
"allows you to " +
|
||||||
"easily distinguish between different network " +
|
"easily distinguish between different network " +
|
||||||
"profiles.", "Profile name:")
|
"profiles.", "Profile name:").strip()
|
||||||
|
|
||||||
# if response is "" or None
|
# if response is "" or None
|
||||||
if not response:
|
if not response:
|
||||||
return
|
error(None, "Invalid profile name", block=True)
|
||||||
|
return False
|
||||||
|
|
||||||
profile_name = response
|
profile_name = response
|
||||||
profile_list = wired.GetWiredProfileList()
|
profile_list = wired.GetWiredProfileList()
|
||||||
|
|||||||
Reference in New Issue
Block a user