SystemMessages.error('Wrong value!') if choice == Operation.ENCODE.value: os.system(clear_com) SystemMessages.banner(term_width) SystemMessages.hard_warning( 'File {} will be re-wrote if present...'.format( stego.get_out_file())) print( '{}>>> Press ^C if you want to cancel the operation.{}'.format( Colors.WARNING.value, Colors.DEFAULT.value)) SystemMessages.basic_warning( 'You can write a max of {} character on this photo!\n\n'. format(stego.get_max_char())) text = input("[INSERT] Text you want to insert on photo: ") try: if not text: raise TooShortTextError text = Steganography.sanitize_text(text) + '\0' if len(text) > (stego.get_max_char() + 1): raise TooLongTextError except TooLongTextError: SystemMessages.error('Too long text for this file!')