Hide error messages


I wrote a script which deletes bones out of a rig and exports the file after this deletation into another file. The Script does it work correctly.
Now I have only one problem left. During the deletation two error messages are shown which i want to hide.

Controller Extractor Error: No Sequences Defined

There are no animation sequences defined in the scene. In order to
seccessfully extract KF or KFM files, you must define at least one animation
sequence. No KF or KFM files will be created until you do so

Export Failure

The converter encountered the following errors:
Controller Extractor was not successful.

Does anyone know how I could do that?

Thanks for your help