Ignore:
Timestamp:
Apr 21, 2011 1:43:09 PM (9 years ago)
Author:
vmaksymiv
Message:

pep8, pyflakes fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.pfg.captcha/trunk/quintagroup/pfg/captcha/validator.py

    r2852 r3168  
    22from Products.validation import validation 
    33from Products.validation.interfaces.IValidator import IValidator 
    4 from Products.CMFPlone.utils import safe_hasattr 
    54 
    6 from config import PLONE_VERSION 
     5from quintagroup.pfg.captcha.config import PLONE_VERSION 
     6 
    77 
    88class CaptchaValidator: 
     
    1919    def __call__(self, value, *args, **kwargs): 
    2020 
    21         form  = kwargs.get('instance') 
     21        form = kwargs.get('instance') 
    2222        portal = getToolByName(form, 'portal_url').getPortalObject() 
    2323        result = portal.captcha_validator() 
    2424        if result.status == 'failure': 
    25             return ("%(problem)s" % {'problem' : result.errors['key'][0]}) 
     25            return ("%(problem)s" % {'problem': result.errors['key'][0]}) 
    2626        else: 
    2727            return 1 
Note: See TracChangeset for help on using the changeset viewer.