mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
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."""
|
"""Uploads a csv file and creates a superset datasource in Hive."""
|
||||||
def get_column_names(filepath):
|
def get_column_names(filepath):
|
||||||
with open(filepath, 'rb') as f:
|
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
|
table_name = form.name.data
|
||||||
filename = form.csv_file.data.filename
|
filename = form.csv_file.data.filename
|
||||||
|
Loading…
Reference in New Issue
Block a user