Skip to content

Commit

Permalink
hotfix for file_name not existing
Browse files Browse the repository at this point in the history
  • Loading branch information
cliu587 committed Dec 3, 2015
1 parent 7099fd5 commit 0ba2819
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dataduct/s3/utils.py
Expand Up @@ -59,7 +59,10 @@ def upload_to_s3(s3_path, file_name=None, file_text=None):
if not any([file_name, file_text]):
raise ETLInputError('File_name or text should be given')

source_size = os.stat(file_name).st_size
if file_name:
source_size = os.stat(file_name).st_size
else:
source_size = len(file_text)
if source_size > CHUNK_SIZE:
bar = pyprind.ProgPercent(
PROGRESS_SECTIONS, monitor=True, title='Uploading %s' % file_name)
Expand Down

0 comments on commit 0ba2819

Please sign in to comment.