Skip to content

Check for architecture existing in python #7588

@verylazyguy

Description

@verylazyguy

Version and Platform (required):

  • Binary Ninja Version: [5.2.8573
  • Edition: Commercial
  • OS: MacOS
  • OS Version: 26.1
  • CPU Architecture: M2

Bug Description:
Have to try/catch to see if an architecture is loaded

Steps To Reproduce:

>>> "aarch64" in Architecture
False
>>> Architecture["aarch64"]
<arch: aarch64>
>>> Architecture.get("aarch64")
Traceback (most recent call last):
  File "<console>", line 1, in <module>
AttributeError: type object 'Architecture' has no attribute 'get'

Expected Behavior:

>>> "aarch64" in Architecture
True
>>> Architecture["aarch64"]
<arch: aarch64>

Metadata

Metadata

Assignees

Labels

Component: APIIssue needs changes to the API

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions