Closed Bug 629809 Opened 13 years ago Closed 13 years ago

AttributeError: 'module' object has no attribute 'ERROR'

Categories

(Cloud Services :: Server: Other, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Atoll, Assigned: tarek)

References

Details

(Whiteboard: [accountportal])

Attachments

(1 file)

I tried to reset the password of an account name I made up out of thin air, that may or may not exist, but I exposed a code bug instead:

2011-01-28 15:36:19,875 ERROR [accountportal] Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/services/util.py", line 427, in __call__
    return self.app(environ, start_response)
  File "/usr/lib/python2.6/site-packages/beaker/middleware.py", line 152, in __call__
    return self.wrap_app(environ, session_start_response)
  File "/usr/lib/python2.6/site-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.6/site-packages/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/accountportal/wsgiapp.py", line 163, in __call__
    result = function(request, **params)
  File "/usr/lib/python2.6/site-packages/accountportal/controllers/console.py", line 104, in forgot
    user_id = self.auth.get_user_id(username)
  File "/usr/lib/python2.6/site-packages/services/auth/ldapsql.py", line 194, in get_user_id
    return None
  File "/usr/lib64/python2.6/contextlib.py", line 34, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/lib/python2.6/site-packages/services/auth/ldappool.py", line 184, in connection
    yield conn
  File "/usr/lib/python2.6/site-packages/services/auth/ldapsql.py", line 190, in get_user_id
    except (ldap.TIMEOUT, ldap.ERROR, ldap.OTHER), e:
AttributeError: 'module' object has no attribute 'ERROR'
Assignee: nobody → telliott
reassigning to Tarek, but I'm about to propose pulling change_email from the account portal anyway
Assignee: telliott → tarek
well that's still an issue in any case -- fixing it now
Status: NEW → ASSIGNED
This patch fixes the ERROR issue, and also the error found in bug 632335. All parts are now covered by the tests I have added.

This patch also removes duplicate patching code in the tests.
Attachment #511668 - Flags: review?(jrconlin)
Blocks: 633468
Comment on attachment 511668 [details] [diff] [review]
Fixes the ERROR and username undefined names error

looks good
Attachment #511668 - Flags: review?(jrconlin) → review+
Commited in http://hg.mozilla.org/services/server-core/rev/729c538969e4
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: