diff options
Diffstat (limited to 'common/latex.py')
-rw-r--r-- | common/latex.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/latex.py b/common/latex.py index a042510..17d3015 100644 --- a/common/latex.py +++ b/common/latex.py @@ -3,7 +3,6 @@ # import os -import platform import re package_test_preamble = ['\\newif\\ifsphinxKeepOldNames \\sphinxKeepOldNamestrue', @@ -82,7 +81,11 @@ def tex_test(test): def host_name(): uname = os.uname() if uname[0] == 'Linux': - distro = platform.dist() + try: + from distro import linux_distribution + except: + from platform import linux_distribution + distro = linux_distribution() name = '%s/%s' % (uname[0], distro[0]) version = distro[1] else: |