Doesn't it because you don't use return operator in last line of my_sub_routine description? You return None from test_read into my_sub_routine , but don't return it's result from my_sub_routine. If I understand, your last line shoud be
return test_read(p)
# not simple test_read(p)