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

Update Try except statements throughout project #96

Closed
MSAdministrator opened this issue Feb 14, 2022 · 0 comments · Fixed by #114
Closed

Update Try except statements throughout project #96

MSAdministrator opened this issue Feb 14, 2022 · 0 comments · Fixed by #114

Comments

@MSAdministrator
Copy link
Collaborator

Small PR attached for this one file issue. I lost a couple of hours to this (path with dash instead of underscore, arg!).

There are many other occurrences of except: pass or except: return None throughout the project. Almost all of those could/should be improved. I don't have the context for the original author's decision so difficult to say what they were expecting might fail. Example from technique.py:

        try:
            for item in self._RELATIONSHIPS[self.stix]:
                if item in item_dict:
                    return_list.append(PreAttckActor(preattck_obj=self.__preattck_obj, **item_dict[item]))
        except:
            pass

Where did the author think this might fail? Is that okay? What error is actually raised? Should it really be ignored?

I will not be working through these other items but they should probably be on somebody's TODO list.

Originally posted by @mcarpenter in #93 (comment)

@MSAdministrator MSAdministrator linked a pull request Jun 16, 2022 that will close this issue
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 a pull request may close this issue.

1 participant