diff --git a/util/secscan/__init__.py b/util/secscan/__init__.py index 92a41da08..738b1f57a 100644 --- a/util/secscan/__init__.py +++ b/util/secscan/__init__.py @@ -97,8 +97,13 @@ PRIORITY_LEVELS = { def get_priority_for_index(index): - for priority in PRIORITY_LEVELS: - if PRIORITY_LEVELS[priority]['index'] == index: - return priority + try: + int_index = int(index) + except ValueError: + return 'Unknown' - return 'Unknown' \ No newline at end of file + for priority in PRIORITY_LEVELS: + if PRIORITY_LEVELS[priority]['index'] == int_index: + return priority + + return 'Unknown'