Skip to content

Commit b1abb68

Browse files
committed
Don't try to call uname on Windows.
1 parent b880e4e commit b1abb68

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/testbed/app.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ def main():
2222
print(f"{platform.uname()=}")
2323
print("-" * 80)
2424
print(f"{os.name=}")
25-
print(f"{os.uname()=}")
25+
if hasattr(os, "uname"):
26+
print(f"{os.uname()=}")
27+
else:
28+
# Windows
29+
print("os.uname() not available")
2630
print("=" * 80)
2731

2832
# Load the platform module

0 commit comments

Comments
 (0)