Skip to content

Commit

Permalink
Convert info messages to warnings for missing files and files of the …
Browse files Browse the repository at this point in the history
…wrong type
  • Loading branch information
Yannis Roussos authored and hsyyid committed Nov 23, 2020
1 parent f730d4e commit 53029fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tap_csv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def write_schema_from_header(entity, header, keys):
def process_file(fileInfo):
#determines if file in question is a file or directory and processes accordingly
if not os.path.exists(fileInfo["file"]):
logger.info(fileInfo["file"] + " does not exist, skipping")
logger.warning(fileInfo["file"] + " does not exist, skipping")
return
if os.path.isdir(fileInfo["file"]):
fileInfo["file"] = os.path.normpath(fileInfo["file"]) + os.sep #ensures directories end with trailing slash
Expand All @@ -49,8 +49,8 @@ def process_file(fileInfo):

def sync_file(fileInfo):
if fileInfo["file"][-4:] != ".csv":
logger.info("Skipping non-csv file '" + fileInfo["file"] + "'")
logger.info("Please provide a CSV file that ends with '.csv'; e.g. 'users.csv'")
logger.warning("Skipping non-csv file '" + fileInfo["file"] + "'")
logger.warning("Please provide a CSV file that ends with '.csv'; e.g. 'users.csv'")
return

logger.info("Syncing entity '" + fileInfo["entity"] + "' from file: '" + fileInfo["file"] + "'")
Expand Down

0 comments on commit 53029fd

Please sign in to comment.