Gracefully handle cases when uname ends with a carriage return.

This commit is contained in:
thandal 2021-08-18 14:07:47 -04:00 committed by GitHub
parent 0ff71e7d2e
commit 4d958721ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)