Skip to content

Conversation

pzakha
Copy link

@pzakha pzakha commented Jun 25, 2021

Prepares drgn for Ubuntu 20.04, which uses a different version of python3 (3.8 vs 3.6).

Testing

@pzakha pzakha requested a review from sdimitro June 25, 2021 15:17
Copy link

@sdimitro sdimitro left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!

@pzakha pzakha merged commit aa76e0f into delphix:master Jul 13, 2021
delphix-devops-bot pushed a commit that referenced this pull request Jul 18, 2025
Add a new drgn.ObjectNotFoundError exception type to use for failed
prog[], prog.object(), prog.variable(), prog.constant(), and
prog.function() lookups. This has a few benefits:

1. It allows catching object lookup errors without the risk of catching
   a stray error from a dict or attribute lookup. See #28.
2. It allows us to have a more descriptive error message. See osandov#527.
3. It makes it possible to get the name that could not be found from the
   exception.

It is a subclass of KeyError (and thus also of LookupError), so this
should be backwards compatible. The implementation is inspired by
AttributeError in CPython.

If we end up liking this, we might want to do the same for object member
lookups.

Signed-off-by: Omar Sandoval <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants