From 4d958721ab7c32a453e2d53b15cafde2b6801bb0 Mon Sep 17 00:00:00 2001 From: thandal Date: Wed, 18 Aug 2021 14:07:47 -0400 Subject: [PATCH] Gracefully handle cases when uname ends with a carriage return. --- test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.py b/test.py index 44496a3..e18b743 100644 --- a/test.py +++ b/test.py @@ -12,7 +12,7 @@ from pymycobot.genre import Angle, Coord if __name__ == "__main__": sys_ = subprocess.check_output(["uname"], shell=True).decode() - if not sys_ == "Linux": + if not sys_.startswith("Linux"): print("This script just can run on Linux.") exit(0)