diff options
| author | Kareem El-Faramawi <kareem02@gmail.com> | 2018-02-26 09:59:06 -0500 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-03-23 17:10:06 -0400 |
| commit | c26bfdb3caa52578f8274316b83b3acc85c34bd3 (patch) | |
| tree | c4af5275761e63fca3f0594bde14eef9cfd44e7f /python | |
| parent | 0febe32406e7e82f554be1f0709afaa87beab188 (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')
| -rw-r--r-- | python/architecture.py | 8 |
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: |
