def try_read_file(s):
try:<EOL><INDENT>with open(s, '<STR_LIT:r>') as f:<EOL><INDENT>data = f.read()<EOL><DEDENT><DEDENT>except FileNotFoundError:<EOL><INDENT>return s<EOL><DEDENT>except EnvironmentError as ex:<EOL><INDENT>print_err('<STR_LIT>'.format(s, ex))<EOL>return None<EOL><DEDENT>return data<EOL>
If `s` is a file name, read the file and return it's content.
        Otherwise, return the original string.
        Returns None if the file was opened, but errored during reading.