summaryrefslogtreecommitdiffstats
path: root/common/latex.py
diff options
context:
space:
mode:
authorVijay Kumar Banerjee <vijay@rtems.org>2021-03-23 14:02:22 -0600
committerVijay Kumar Banerjee <vijay@rtems.org>2021-03-30 09:28:59 -0600
commit998f8755e08a0235f3838a9cf537d8f08769c956 (patch)
treee85ca529585b8e1d510832ef113271f7610c53bc /common/latex.py
parent22d213c4846d2d783a8e84cc0b8e067dfe9b1a1e (diff)
downloadrtems-docs-998f8755e08a0235f3838a9cf537d8f08769c956.tar.bz2
common/latex.py: use distro module for python3.5 and up
Diffstat (limited to 'common/latex.py')
-rw-r--r--common/latex.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/common/latex.py b/common/latex.py
index a042510..a1b3917 100644
--- a/common/latex.py
+++ b/common/latex.py
@@ -3,8 +3,11 @@
#
import os
-import platform
import re
+try:
+ from distro import linux_distribution
+except:
+ from platform import linux_distribution
package_test_preamble = ['\\newif\\ifsphinxKeepOldNames \\sphinxKeepOldNamestrue',
'\documentclass[a4paper,11pt,english]{report}']
@@ -82,7 +85,7 @@ def tex_test(test):
def host_name():
uname = os.uname()
if uname[0] == 'Linux':
- distro = platform.dist()
+ distro = linux_distribution()
name = '%s/%s' % (uname[0], distro[0])
version = distro[1]
else: