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

Referencing Variable before it exists #233

Open
WildSecurity opened this issue May 24, 2022 · 0 comments
Open

Referencing Variable before it exists #233

WildSecurity opened this issue May 24, 2022 · 0 comments

Comments

@WildSecurity
Copy link

Hello Everyone,

I've noticed the following two code Fragments:
if not date_modified: at line 157
https://github.com/atc-project/atomic-threat-coverage/blob/master/scripts/es_index_export.py#L157
if not date_created: at line 136
https://github.com/atc-project/atomic-threat-coverage/blob/master/scripts/es_index_export.py#L136

My python skills are negligable, but I think it should be
if not "date_modified" in locals() or something like this.
Otherwise python will crash because it is trying to access a variable which may not be assigned.

If I would be more proficient in git, I would send a merge request, but I hope this is good enough.

Regards,

Linus

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

No branches or pull requests

1 participant