From 836d00f69af5e89472e39c0370590b894cdb87d1 Mon Sep 17 00:00:00 2001 From: glmdev Date: Fri, 30 Nov 2018 17:06:24 -0600 Subject: [PATCH] add invalid directive fail --- do_what.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/do_what.py b/do_what.py index f4ca9fd..b35c0ef 100644 --- a/do_what.py +++ b/do_what.py @@ -261,6 +261,10 @@ elif ( active and len(sys.argv) > argiter+1 and sys.argv[argiter+1] == 'r' ): print("echo Restored directory: "+restorepath) exit() +elif ( active and len(sys.argv) > argiter+1 ): + print("echo Invalid directive: "+sys.argv[argiter+1]) + exit() + # File Operations if ( (not active and len(sys.argv) == 1) or (active and len(sys.argv) == 2) ): # list the contents of the current directory