Ignore:
Timestamp:
Feb 11, 2013 11:12:59 AM (11 years ago)
Author:
kroman0
Message:

Fixed errors on validation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.captcha.core/trunk/quintagroup/captcha/core/skins/captcha_core/static/getCaptchaImage.py

    r1954 r3618  
    1010    getWord, parseKey 
    1111 
    12 hk = context.REQUEST.traverse_subpath[0] 
    13 dk = decrypt(context.captcha_key, hk) 
     12try: 
     13    hk = context.REQUEST.traverse_subpath[0] 
     14except IndexError: 
     15    return 
     16try: 
     17    dk = decrypt(context.captcha_key, hk) 
     18except: 
     19    return 
    1420key = parseKey(dk)['key'] 
    15 img = getattr(context, '%s.jpg' % key) 
     21try: 
     22    img = getattr(context, '%s.jpg' % key) 
     23except AttributeError: 
     24    return 
    1625return img.index_html(context.REQUEST, context.REQUEST.RESPONSE) 
Note: See TracChangeset for help on using the changeset viewer.