Merge pull request #32 from thandal/patch-1

Gracefully handle cases when uname ends with a carriage return.
This commit is contained in:
Zachary 2021-08-19 10:28:31 +08:00 committed by GitHub
commit ddf7d5ebea
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)