in the previous result for with string '\n', substitute the result for eol_message. get 'value' attribute of the _active object, if it exists substitute it for t, if not t is None.
t = getattr ( _active , "value" , None )