add try around read for UTF-8 issue

master-b-p-s
Alan Johnston 3 weeks ago committed by GitHub
parent 9518ba870e
commit e24cdc0724
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -27,6 +27,7 @@ if __name__ == "__main__":
if ('d' == sys.argv[1]):
debug_mode = True
try:
for line in sys.stdin:
# if (debug_mode):
print(line, end =" ")
@ -170,8 +171,9 @@ if __name__ == "__main__":
print("\n/home/pi/CubeSatSim/config -" + mode)
system("/home/pi/CubeSatSim/config -" + mode)
change_mode = False
except:
print("Error reading line (probably due to UTF-8 issue)")
print("Waiting 5 seconds to allow unplug and plug of soundcard")
sleep(5)

Loading…
Cancel
Save

Powered by TurnKey Linux.