aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/python/vpp_papi/vpp_serializer.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api/python/vpp_papi/vpp_serializer.py')
-rw-r--r--src/vpp-api/python/vpp_papi/vpp_serializer.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/vpp-api/python/vpp_papi/vpp_serializer.py b/src/vpp-api/python/vpp_papi/vpp_serializer.py
index e6012018f08..1e59e366a8f 100644
--- a/src/vpp-api/python/vpp_papi/vpp_serializer.py
+++ b/src/vpp-api/python/vpp_papi/vpp_serializer.py
@@ -16,10 +16,17 @@
import struct
import collections
import sys
-if sys.version[0] == '2':
- from aenum import IntEnum, IntFlag
+
+if sys.version_info <= (3, 4):
+ from aenum import IntEnum
else:
- from enum import IntEnum, IntFlag
+ from enum import IntEnum
+
+if sys.version_info <= (3, 6):
+ from aenum import IntFlag
+else:
+ from enum import IntFlag
+
import logging
from . import vpp_format
import ipaddress