[PATCH 1/2] Fix the linux specific include

chrisj at rtems.org chrisj at rtems.org
Thu May 20 22:14:56 UTC 2021


From: Chris Johns <chrisj at rtems.org>

---
 common/latex.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/common/latex.py b/common/latex.py
index a1b3917..17d3015 100644
--- a/common/latex.py
+++ b/common/latex.py
@@ -4,10 +4,6 @@
 
 import os
 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}']
@@ -85,6 +81,10 @@ def tex_test(test):
 def host_name():
     uname = os.uname()
     if uname[0] == 'Linux':
+        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]
-- 
2.24.3 (Apple Git-128)



More information about the devel mailing list