Skip to content

Conversation

antazoey
Copy link
Contributor

@antazoey antazoey commented Mar 6, 2020

No description provided.

@antazoey antazoey changed the title Make work Hande begin date complications Mar 6, 2020
@antazoey antazoey changed the title Hande begin date complications Handle begin date complications Mar 6, 2020
@antazoey antazoey requested a review from alanag13 March 6, 2020 22:07
Copy link
Contributor

@alanag13 alanag13 left a comment

Choose a reason for hiding this comment

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

Looks great, just small doc adjusts and some simplification re: port number

README.md Outdated
@@ -2,7 +2,8 @@

Use the `code42` command to interact with your Code42 environment.
`code42 securitydata` is a CLI tool for extracting AED events.
Additionally, `code42 securitydata` can record a checkpoint so that you only get events you have not previously gotten.
Additionally, `code42 securitydata` can record a checkpoint so that you only get events you have not previously gotten
Copy link
Contributor

Choose a reason for hiding this comment

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

I would phrase this as you only get events that were reported to Code42 since the previous time you recorded a checkpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about you only get events that Code42 previously did not observe since you last recorded a checkpoint ?

Copy link
Contributor

Choose a reason for hiding this comment

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

that works for me

@antazoey antazoey requested a review from alanag13 March 10, 2020 16:23
Copy link
Contributor

@alanag13 alanag13 left a comment

Choose a reason for hiding this comment

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

just a little simplification on urlparsing still


def get_url_parts(url_str):
parts = url_str.split(u":")
if parts[0] == u"http" or parts[0] == u"https":
Copy link
Contributor

@alanag13 alanag13 Mar 10, 2020

Choose a reason for hiding this comment

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

this could be any protocol, not just http or https (sftp://, ftp:// ssh:// are all valid, for example).
It would probably be easier to use some thing like urlparse and do something like

parsed_host = urlparse(url_str)
return parsed_host.netloc #(string that contains domain and port).

You could wrap that whole thing in a try/catch to error out on invalid addresses that can't be parsed

@antazoey antazoey requested a review from alanag13 March 10, 2020 20:19
@antazoey antazoey merged commit 840aeae into master Mar 11, 2020
@antazoey antazoey deleted the bugfix/begin-date-requirements branch March 11, 2020 16:02
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