mirror of https://github.com/apache/superset.git
call next() the right way (#4804)
This commit is contained in:
parent
3c29ca79ae
commit
20f46eede5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue