aboutsummaryrefslogtreecommitdiffstats
path: root/extras/vpp_config/vpplib
diff options
context:
space:
mode:
Diffstat (limited to 'extras/vpp_config/vpplib')
-rw-r--r--extras/vpp_config/vpplib/VPPUtil.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/extras/vpp_config/vpplib/VPPUtil.py b/extras/vpp_config/vpplib/VPPUtil.py
index 5ed46f2452e..9835f51f0fd 100644
--- a/extras/vpp_config/vpplib/VPPUtil.py
+++ b/extras/vpp_config/vpplib/VPPUtil.py
@@ -17,11 +17,12 @@ from __future__ import print_function
import logging
import re
import subprocess
-import platform
import requests
from collections import Counter
+import distro
+
ubuntu_pkgs = {'release': ['vpp', 'vpp-plugins', 'vpp-api-java', 'vpp-api-lua', 'vpp-api-python',
'vpp-dbg', 'vpp-dev'],
'master': ['vpp', 'vpp-plugin-core', 'vpp-api-python',
@@ -705,14 +706,14 @@ class VPPUtil(object):
:rtype: list
"""
- distro = platform.linux_distribution()
- if distro[0] == 'Ubuntu' or \
- distro[0] == 'CentOS Linux' or \
- distro[:7] == 'Red Hat':
- return distro
+ dist = distro.linux_distribution()
+ if dist[0] == 'Ubuntu' or \
+ dist[0] == 'CentOS Linux' or \
+ dist[:7] == 'Red Hat':
+ return dist
else:
raise RuntimeError(
- 'Linux Distribution {} is not supported'.format(distro[0]))
+ 'Linux Distribution {} is not supported'.format(dist[0]))
@staticmethod
def version():