Skip to content

Conversation

adrien-goetz-wmx
Copy link

#42

I add two options to fix 2 bugs I found when running the script.

N°1 : --convert_date

Traceback (most recent call last):
File "/Users/adrien/cloudgrep/cloudgrep.py", line 3, in
main.main()
File "/Users/adrien/cloudgrep/cloudgrep/main.py", line 69, in main
CloudGrep().search(
File "/Users/adrien/cloudgrep/cloudgrep/cloudgrep.py", line 117, in search
matching_keys = list(
^^^^^
File "/Users/adrien/cloudgrep/cloudgrep/cloud.py", line 186, in get_objects
if self.filter_object(obj, key_contains, from_date, end_date, file_size, convert_date=convert_date):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adrien/cloudgrep/cloudgrep/cloud.py", line 246, in filter_object
if from_date and last_modified < from_date:
^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: can't compare offset-naive and offset-aware datetimes

I force conversion of from_date, end_date and last_modified variables using pytz

N°2: --use_og_name

When deciding if file should be uncompressed, script looks for .gz extension in tmp_name file generated by tempfile and not in original bucket key

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.

1 participant