Ticket #851: uppercase_labels.diff
File uppercase_labels.diff, 918 bytes (added by , 15 years ago) |
---|
-
deluge/plugins/label/label/core.py
47 47 import traceback 48 48 import re 49 49 50 RE_VALID = re.compile(" [a-z0-9_\-\.]*\Z")50 RE_VALID = re.compile("\A[\w\-\. ]*\Z") 51 51 52 52 KNOWN_STATES = ['Downloading','Seeding','Paused','Checking','Queued','Error'] 53 53 STATE = "state" … … 185 185 """add a label 186 186 see label_set_options for more options. 187 187 """ 188 label_id = label_id.lower() 189 CheckInput(RE_VALID.match(label_id) , _("Invalid label, valid characters:[a-z0-9_-]")) 188 CheckInput(RE_VALID.match(label_id) , _("Invalid label, valid characters:[a-zA-Z0-9_- ]")) 190 189 CheckInput(label_id, _("Empty Label")) 191 190 CheckInput(not (label_id in self.labels) , _("Label already exists")) 192 191