From c26bfdb3caa52578f8274316b83b3acc85c34bd3 Mon Sep 17 00:00:00 2001 From: Kareem El-Faramawi Date: Mon, 26 Feb 2018 09:59:06 -0500 Subject: Fix type error for get_semantic_{flag,class}_name (#957) {group,class}_index might be a long, which would throw a ValueError --- python/architecture.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'python') 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: -- cgit v1.3.1