def count_lines_exception(filename):
    """
    Count the number of lines in a file.
    If file can't be opened, treated the same as if it was empty
    """
    try:
        return len(open(filename, 'r').readlines())
    except (EnvironmentError, TypeError):
        print('Exception error')
        return 0