scripts/glibcelf.py: Mark as UNSUPPORTED on Python 3.5 and earlier

enum.IntFlag and enum.EnumMeta._missing_ support are not part of
earlier Python versions.
This commit is contained in:
Florian Weimer 2022-04-22 19:34:52 +02:00
parent c966099cdc
commit b571f3adff

View File

@ -28,6 +28,12 @@ import collections
import enum
import struct
if not hasattr(enum, 'IntFlag'):
import sys
sys.stdout.write(
'warning: glibcelf.py needs Python 3.6 for enum support\n')
sys.exit(77)
class _OpenIntEnum(enum.IntEnum):
"""Integer enumeration that supports arbitrary int values."""
@classmethod