summaryrefslogtreecommitdiff
path: root/python/architecture.py
diff options
context:
space:
mode:
authorKyleMiles <krm504@nyu.edu>2019-05-31 14:17:00 -0400
committerKyleMiles <krm504@nyu.edu>2019-05-31 14:17:28 -0400
commit4452de9f22a8a9666f159a9fd5d66b67223ce2e5 (patch)
treec436f2f475e1f580d5771900b4040e86c28a5457 /python/architecture.py
parentf80491d350ea8c8c80373ea0c5e68358c2217d82 (diff)
Clean Up 2/3 int/long Compatibility
Diffstat (limited to 'python/architecture.py')
-rw-r--r--python/architecture.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/architecture.py b/python/architecture.py
index 1f1422cb..eabcbaa0 100644
--- a/python/architecture.py
+++ b/python/architecture.py
@@ -38,7 +38,8 @@ from binaryninja import callingconvention
# 2-3 compatibility
from binaryninja import range
from binaryninja import with_metaclass
-from binaryninja import long
+import numbers
+
class _ArchitectureMetaClass(type):
@@ -1575,7 +1576,7 @@ class Architecture(with_metaclass(_ArchitectureMetaClass, object)):
:return: the name of the semantic flag class
:rtype: str
"""
- if not isinstance(class_index, (int, long)):
+ if not isinstance(class_index, numbers.Integral):
raise ValueError("argument 'class_index' must be an integer")
try:
return self._semantic_flag_classes_by_index[class_index]
@@ -1597,7 +1598,7 @@ class Architecture(with_metaclass(_ArchitectureMetaClass, object)):
:return: the name of the semantic flag group
:rtype: str
"""
- if not isinstance(group_index, (int, long)):
+ if not isinstance(group_index, numbers.Integral):
raise ValueError("argument 'group_index' must be an integer")
try:
return self._semantic_flag_groups_by_index[group_index]