From 53b4c5cbcb9e3d4481c5c2cea4486954a5e1cad6 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 30 May 2021 17:17:30 -0400 Subject: [PATCH] quit program --- it/Q.py | 6 +----- it/exit.py | 4 ++++ it/q.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 it/exit.py diff --git a/it/Q.py b/it/Q.py index aac715a..8ebad32 100644 --- a/it/Q.py +++ b/it/Q.py @@ -1,8 +1,4 @@ from sys import exit def main(buffer, argv): - if len(argv) > 1: - print("?") - else: - exit(0) - return buffer + return 0 diff --git a/it/exit.py b/it/exit.py new file mode 100644 index 0000000..9080618 --- /dev/null +++ b/it/exit.py @@ -0,0 +1,4 @@ +import sys + +def main(buffer, command): + sys.exit(0) diff --git a/it/q.py b/it/q.py index e73f7ec..f05cd12 100644 --- a/it/q.py +++ b/it/q.py @@ -1,8 +1,8 @@ from sys import exit def main(buffer, argv): - if len(argv) > 1 or not(buffer.saved): + if not(buffer.saved): print("?") else: - exit(0) + buffer = 0 return buffer