mirror of
https://github.com/zoriya/AnonymousGoose.git
synced 2026-06-05 06:59:13 +00:00
Making the print function return a success bool
This commit is contained in:
+6
-2
@@ -37,8 +37,12 @@ class Term:
|
|||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
def print(self, msg):
|
def print(self, msg):
|
||||||
with open(self.tty, "w") as file:
|
try:
|
||||||
file.write(msg)
|
with open(self.tty, "w") as file:
|
||||||
|
file.write(msg)
|
||||||
|
return True
|
||||||
|
except PermissionError:
|
||||||
|
return False
|
||||||
|
|
||||||
def print_creepy(self, msg):
|
def print_creepy(self, msg):
|
||||||
with open(self.tty, "w") as file:
|
with open(self.tty, "w") as file:
|
||||||
|
|||||||
Reference in New Issue
Block a user