Changeset 1593
- Timestamp:
- 07/06/04 20:09:42 (20 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/NEWS
r1592 r1593 24 24 - 1.19alpha30 : 25 25 26 - Usernames, Groupnames and Printernames can now contain 27 ANY character, expected '/' and '@'. 28 26 29 - Integrated most of the Debian work from Sergio 27 30 Gonz�z Gonz�z -
pykota/trunk/pykota/tool.py
r1584 r1593 22 22 # 23 23 # $Log$ 24 # Revision 1.111 2004/07/06 18:09:42 jalet 25 # Reduced the set of invalid characters in names 26 # 24 27 # Revision 1.110 2004/07/01 19:56:42 jalet 25 28 # Better dispatching of error messages … … 585 588 def isValidName(self, name) : 586 589 """Checks if a user or printer name is valid.""" 587 # unfortunately Python 2.1 string modules doesn't define ascii_letters... 588 asciiletters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' 589 digits = '0123456789' 590 validchars = asciiletters + digits + "-_." 591 for c in name : 592 if c not in validchars : 590 invalidchars = "/@" 591 for c in invalidchars : 592 if c in name : 593 593 return 0 594 594 return 1