#NEWLINE# def __contains__( self , username ) : #NEWLINE# #INDENT# 'Check if the database contains the specified username.\n\n        @type username: str\n        @param username: The username to check for.\n\n        @rtype: bool\n        @return: True if the database contains the username, False\n        otherwise.\n\n        ' #NEWLINE# if ( self . db == None ) : #NEWLINE# #INDENT# raise AssertionError ( 'DB not open' ) #NEWLINE# #UNINDENT# self . lock . acquire ( ) #NEWLINE# try : #NEWLINE# #INDENT# return ( username in self . db ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# self . lock . release ( )