From eb52451f3327fe7e36252bcc85f2357024f145db Mon Sep 17 00:00:00 2001 From: Raja Tumbalabeedu Date: Wed, 20 May 2020 16:26:50 +0000 Subject: [PATCH] Issue# 303. Added validation to the return code of the os.system call to check if the fuzzywuzzy installation is success. --- xsstrike.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xsstrike.py b/xsstrike.py index b30f3cb..01cc0ba 100644 --- a/xsstrike.py +++ b/xsstrike.py @@ -17,7 +17,10 @@ try: except ImportError: import os print ('%s fuzzywuzzy isn\'t installed, installing now.' % info) - os.system('pip3 install fuzzywuzzy') + ret_code = os.system('pip3 install fuzzywuzzy') + if(ret_code != 0): + print('%s fuzzywuzzy installation failed.' % bad) + quit() print ('%s fuzzywuzzy has been installed, restart XSStrike.' % info) quit() except ImportError: # throws error in python2