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

Support alternate datetime format for S3 files #262

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mattharrison
Copy link

This supports alternate formats for S3 buckets

@lurch
Copy link
Contributor

lurch commented Sep 19, 2016

I wonder if using a regex might be more reliable than simply looking for a hyphen? shrug

@lurch
Copy link
Contributor

lurch commented Sep 20, 2016

The second of these two commits seems to be a duplicate of #232 ?

I've never used S3, so can't test this myself, and I'd rather have feedback from other users that this still works with all versions of Python, before merging.

@mattharrison
Copy link
Author

@lurch - Thanks for your comments. I'm not sure how the second commit got into this PR.

My Py3 patch was based on that one, so they are similar.

Regarding using a regex. My opinion is that a regex is a tool to use when you have nothing else. In this case I know the other format doesn't have a dash in it, so a simple check should suffix. I guess the more correct code would be to use a smarter date parser (would introduce 3rd party dep) or try and format, then in the error handling code try again.

Anyway, it works for me in Python 3 for adding, removing, renaming, and getting file info of both binary and text files, as well as directories. shrug :)

@lurch
Copy link
Contributor

lurch commented Sep 20, 2016

If you can remove the second commit from this PR and force-push, I'd be happy to merge this alternate-datetime PR.

I suspect the second commit snuck into this PR because you've created it from your master branch, rather than the usual practice of PR-ing from an alternate branch.

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