summaryrefslogtreecommitdiff
path: root/python/architecture.py
diff options
context:
space:
mode:
authorKareem El-Faramawi <kareem02@gmail.com>2018-02-26 09:59:06 -0500
committerplafosse <peter@vector35.com>2018-02-26 09:59:06 -0500
commit1b044bf3988500367391467064696832a0edff41 (patch)
treec4af5275761e63fca3f0594bde14eef9cfd44e7f /python/architecture.py
parentef91ab7f3b648051b72fd06dd05eff3c57fa7f65 (diff)
Fix type error for get_semantic_{flag,class}_name (#957)
{group,class}_index might be a long, which would throw a ValueError
Diffstat (limited to 'python/architecture.py')
-rw-r--r--python/architecture.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/architecture.py b/python/architecture.py
index 51a7cfba..2b52ea35 100644
--- a/python/architecture.py
+++ b/python/architecture.py
@@ -1839,8 +1839,8 @@ class Architecture(object):
:return: the name of the semantic flag class
:rtype: str
"""
- if not isinstance(class_index, int):
- raise ValueError("argument 'class_index' must be an intege")
+ if not isinstance(class_index, (int, long)):
+ raise ValueError("argument 'class_index' must be an integer")
try:
return self._semantic_flag_classes_by_index[class_index]
except KeyError:
@@ -1861,8 +1861,8 @@ class Architecture(object):
:return: the name of the semantic flag group
:rtype: str
"""
- if not isinstance(group_index, int):
- raise ValueError("argument 'group_index' must be an intege")
+ if not isinstance(group_index, (int, long)):
+ raise ValueError("argument 'group_index' must be an integer")
try:
return self._semantic_flag_groups_by_index[group_index]
except KeyError: