def is_valid_csv(parser, file_name, row_limit):
 row_count = 0
 for row in csv.reader(open(file_name)):
  row_count += 1
 if (row_limit > row_count):
  parser.error("The 'row_count' of '{}' is > the number of rows in '{}'!".format(row_limit, file_name))
  sys.exit(1)

def is_valid_csv ( parser , file_name , row_limit ) : row_count = 0 for row in csv . reader ( open ( file_name ) ) : row_count += 1 if ( row_limit > row_count ) : parser . error ( "The 'row_count' of '{}' is > the number of rows in '{}'!" . format ( row_limit , file_name ) ) sys . exit ( 1 )
ensure that the # of rows in the input_file is greater than the row_limit .