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:
parent
c966099cdc
commit
b571f3adff
|
@ -28,6 +28,12 @@ import collections
|
||||||
import enum
|
import enum
|
||||||
import struct
|
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):
|
class _OpenIntEnum(enum.IntEnum):
|
||||||
"""Integer enumeration that supports arbitrary int values."""
|
"""Integer enumeration that supports arbitrary int values."""
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
Loading…
Reference in a new issue