Changeset 1511 for trunk/pylucid/PyLucid/tools/shortcuts.py
- Timestamp:
- 03/28/08 08:51:04 (8 months ago)
- Files:
-
- 1 modified
-
trunk/pylucid/PyLucid/tools/shortcuts.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pylucid/PyLucid/tools/shortcuts.py
r1503 r1511 19 19 ALLOW_CHARS = string.ascii_letters + string.digits + "_" 20 20 21 def verify_shortcut(shortcut): 22 """ 23 Check a shortcut. Raise AssertionError if something seems to be wrong. 24 But normaly the urls-re should only filter the bad thing from urls ;) 25 """ 26 if shortcut=="": 27 raise AssertionError("Shortcut is empty!") 28 29 for char in shortcut: 30 if not char in ALLOW_CHARS: 31 raise AssertionError( 32 "Not allowed character in shortcut: '%r'" % char 33 ) 21 34 22 35 def makeUnique(item_name, name_list):
