call next() the right way (#4804)

This commit is contained in:
timifasubaa 2018-04-11 13:20:14 -07:00 committed by Maxime Beauchemin
parent 3c29ca79ae
commit 20f46eede5
1 changed files with 1 additions and 1 deletions

View File

@ -869,7 +869,7 @@ class HiveEngineSpec(PrestoEngineSpec):
"""Uploads a csv file and creates a superset datasource in Hive."""
def get_column_names(filepath):
with open(filepath, 'rb') as f:
return unicodecsv.reader(f, encoding='utf-8-sig').next()
return next(unicodecsv.reader(f, encoding='utf-8-sig'))
table_name = form.name.data
filename = form.csv_file.data.filename