From cfdd99b111824b6fefe899b2b3759c56b0927fa6 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Tue, 13 Jul 2010 10:41:26 +0000 Subject: [PATCH] remove unnecessary imports / variables; whitespace svn path=/plone.app.discussion/trunk/; revision=37767 --- plone/app/discussion/browser/controlpanel.py | 5 +---- plone/app/discussion/browser/validator.py | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/plone/app/discussion/browser/controlpanel.py b/plone/app/discussion/browser/controlpanel.py index 328bfec..99c2b9e 100644 --- a/plone/app/discussion/browser/controlpanel.py +++ b/plone/app/discussion/browser/controlpanel.py @@ -1,7 +1,4 @@ -from Products.Five.browser import BrowserView - -from zope.component import queryUtility -from plone.registry.interfaces import IRegistry +# -*- coding: utf-8 -*- from plone.app.registry.browser import controlpanel diff --git a/plone/app/discussion/browser/validator.py b/plone/app/discussion/browser/validator.py index 063242f..45043f5 100644 --- a/plone/app/discussion/browser/validator.py +++ b/plone/app/discussion/browser/validator.py @@ -47,8 +47,6 @@ class CaptchaValidator(validator.SimpleFieldValidator): def validate(self, value): super(CaptchaValidator, self).validate(value) - data = self.request.form - registry = queryUtility(IRegistry) settings = registry.forInterface(IDiscussionSettings) @@ -56,7 +54,7 @@ class CaptchaValidator(validator.SimpleFieldValidator): captcha = getMultiAdapter((aq_inner(self.context), self.request), name=settings.captcha) if not captcha.verify(input=value): - raise WrongCaptchaCode + raise WrongCaptchaCode else: return True