#NEWLINE# def _add_duplicate( self , idspecid , newid ) : #NEWLINE# #INDENT# '\n        Adds a duplicate ID (as identified by id_spec) and its new ID to the\n        duplicates table so that they can be later searched for merging.\n\n        Parameters\n        ----------\n        newid : str\n            The primary key used in the features table\n\n        idspecid : str\n            The ID identified by id_spec\n        ' #NEWLINE# c = self . conn . cursor ( ) #NEWLINE# try : #NEWLINE# #INDENT# c . execute ( '\n                INSERT INTO duplicates\n                (idspecid, newid)\n                VALUES (?, ?)' , ( idspecid , newid ) ) #NEWLINE# #UNINDENT# except sqlite3 . ProgrammingError : #NEWLINE# #INDENT# c . execute ( '\n                INSERT INTO duplicates\n                (idspecid, newid)\n                VALUES (?, ?)' , ( idspecid . decode ( self . default_encoding ) , newid . decode ( self . default_encoding ) ) ) #NEWLINE# #UNINDENT# if ( self . verbose == 'debug' ) : #NEWLINE# #INDENT# logger . debug ( ( 'added id=%s; new=%s' % ( idspecid , idspecid ) ) ) #NEWLINE# #UNINDENT# self . conn . commit ( )