Making the print function return a success bool

This commit is contained in:
Anonymus Raccoon
2020-04-25 17:29:54 +02:00
parent b55b830051
commit c878bee721
+6 -2
View File
@@ -37,8 +37,12 @@ class Term:
time.sleep(1)
def print(self, msg):
with open(self.tty, "w") as file:
file.write(msg)
try:
with open(self.tty, "w") as file:
file.write(msg)
return True
except PermissionError:
return False
def print_creepy(self, msg):
with open(self.tty, "w") as file: