cisco-system-traffic-generator/trex-core

Fail due to module 'platform' has no attribute 'dist'

J-Binieda-ericsson opened this issue · 0 comments

Error while determining OS type: module 'platform' has no attribute 'dist'

Above message is meaningless in TRex if you run on non-official Linux distro(Ubuntu). Official distro is RedHat or Centos.

Since platfrom.dist() API is removed from newer version of Python, it's better to use dist = distro.linux_distribution().
But, import distro may not be available on some servers, so the best way is to embed distro package in TRex and replace API.