Skip to content

Commit c114859

Browse files
authored
Update lsf.i
1 parent 85bd403 commit c114859

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

pythonlsf/lsf.i

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -434,35 +434,6 @@ PyObject * get_host_load_from_batch (
434434
}
435435

436436

437-
PyObject * ls_load_py(char *resreq, int *numhosts, int options, char *fromhost) {
438-
439-
struct hostLoad * hosts = NULL;
440-
int i = 0, j = 0;
441-
442-
hosts = ls_load(resreq, numhosts, options, fromhost);
443-
444-
if (hosts == NULL) {
445-
ls_perror("ls_load_py");
446-
exit(-1);
447-
}
448-
449-
/* Python3 can not handle dirty string.*/
450-
for (i = 0; i < *numhosts; i++) {
451-
int size_string = sizeof(hosts[i].hostName);
452-
int len_string = strlen(hosts[i].hostName);
453-
for ( j = len_string; j < size_string; j++) hosts[i].hostName[j] = 0;
454-
}
455-
456-
PyObject * result = PyList_New(*numhosts);
457-
for (i = 0; i < *numhosts; i++) {
458-
PyObject *o = SWIG_NewPointerObj(SWIG_as_voidptr(&hosts[i]),
459-
SWIGTYPE_p_hostLoad, 0 | 0 );
460-
PyList_SetItem(result,i,o);
461-
}
462-
463-
return result;
464-
}
465-
466437
PyObject * ls_load_py(char *resreq, int *numhosts, int options, char *fromhost) {
467438

468439
struct hostLoad * hosts = NULL;

0 commit comments

Comments
 (0)