iigs
2024-04-02 05257fc24bf6af124b41cfc0115441b17e1bbac1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
https://github.com/pallets/werkzeug/pull/2773
 
--- werkzeug-3.0.2/src/werkzeug/debug/__init__.py.orig
+++ werkzeug-3.0.2/src/werkzeug/debug/__init__.py
@@ -116,6 +116,15 @@
             except OSError:
                 pass
 
+        # On illumos and Solaris use the hostid(1) tool.
+        if sys.platform == "sunos5":
+            from subprocess import Popen, PIPE
+            hostid = Popen(
+                ["/usr/bin/hostid"], stdout=PIPE
+            ).communicate()[0]
+            if hostid is not "":
+                return hostid
+
         return None
 
     _machine_id = _generate()