chg, clean up

This commit is contained in:
iceman1001 2020-05-26 21:58:50 +02:00
commit 125e05ec0e

View file

@ -264,7 +264,6 @@ static int CmdScriptRun(const char *Cmd) {
For apt-cyg (Cygwin...):
apt-cyg install python3-devel # for python3.x installs
*/
#ifdef HAVE_PYTHON
@ -288,7 +287,6 @@ static int CmdScriptRun(const char *Cmd) {
//int argc, char ** argv
char *argv[128];
int argc = split(arguments, argv);
wchar_t *py_args[argc];
py_args[0] = Py_DecodeLocale(preferredName, NULL);
for (int i = 0; i < argc; i++) {
@ -312,12 +310,8 @@ static int CmdScriptRun(const char *Cmd) {
return PM3_ESOFT;
}
// to we need to manually call all importmodules?
//PyImport_ImportModule("requests");
PyRun_SimpleFileExFlags(f, preferredName, 1, NULL);
Py_Finalize();
PyMem_RawFree(program);
free(script_path);
PrintAndLogEx(SUCCESS, "\nfinished " _YELLOW_("%s"), preferredName);