Issue# 303. Added validation to the return code of the os.system call to check if the fuzzywuzzy installation is success.

This commit is contained in:
Raja Tumbalabeedu
2020-05-20 16:26:50 +00:00
parent 0ecedc1bba
commit eb52451f33

View File

@@ -17,7 +17,10 @@ try:
except ImportError: except ImportError:
import os import os
print ('%s fuzzywuzzy isn\'t installed, installing now.' % info) 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) print ('%s fuzzywuzzy has been installed, restart XSStrike.' % info)
quit() quit()
except ImportError: # throws error in python2 except ImportError: # throws error in python2