Skip to content

Commit

Permalink
Handle missing table location
Browse files Browse the repository at this point in the history
  • Loading branch information
kukushking committed Jun 30, 2021
1 parent f98d6ba commit ab5919f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion awswrangler/s3/_write_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def to_csv( # pylint: disable=too-many-arguments,too-many-locals,too-many-state
catalog_table_input = catalog._get_table_input( # pylint: disable=protected-access
database=database, table=table, boto3_session=session, catalog_id=catalog_id
)
catalog_path = catalog_table_input["StorageDescriptor"]["Location"] if catalog_table_input else None
catalog_path = catalog_table_input.get("StorageDescriptor", {}).get("Location") if catalog_table_input else None
if path is None:
if catalog_path:
path = catalog_path
Expand Down

0 comments on commit ab5919f

Please sign in to comment.