Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFR-2352: Script to upload digital assets to Google Drive #458

Merged
merged 5 commits into from
Nov 22, 2024

Conversation

kylevillegas93
Copy link
Contributor

@kylevillegas93 kylevillegas93 commented Nov 21, 2024

Description

  • Migrates files from S3 to google drive

Testing

python scripts/migrate_digital_assets.py

@kylevillegas93 kylevillegas93 changed the title SFr-2352: Script to upload digital assets to Google Drive SFR-2352: Script to upload digital assets to Google Drive Nov 22, 2024
@kylevillegas93 kylevillegas93 marked this pull request as ready for review November 22, 2024 19:11
Comment on lines +57 to +58
except Exception as e:
print(f'Failed to upload {file_key} to Google Drive: {e}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the "e" variable here if Exception here will detail the reasons behind the error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! the print statement here won't know about the exception message by default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that makes sense. A logger would show the exception message by default not a print statement.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly!

Copy link
Contributor

@mitri-slory mitri-slory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and I only have one question on a try/except block.

@kylevillegas93 kylevillegas93 merged commit 147afa0 into main Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants