#NEWLINE# def _AddHuntErrorToCollection( self , error , collection_urn ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# aff4 . FACTORY . Open ( collection_urn , 'HuntErrorCollection' , mode = 'rw' , token = self . token ) . Add ( error ) #NEWLINE# #UNINDENT# except IOError : #NEWLINE# #INDENT# aff4_collections . PackedVersionedCollection . AddToCollection ( collection_urn , [ error ] , sync = False , token = collection_urn . token )