Case for len(load)==0 is already covered by L134.
By raising a warining, execution halts. Proposed solution: log the warning, and let the code which calls this function deal with the case where len(load)==0 appropriately.
Old implementation leads to a hard-to-capture warning, proposed implementation allows for nice capturing of exception at the right level.
Case for len(load)==0 is already covered by L134. By raising a warining, execution halts. Proposed solution: log the warning, and let the code which calls this function deal with the case where len(load)==0 appropriately.
Old implementation leads to a hard-to-capture warning, proposed implementation allows for nice capturing of exception at the right level.