So hopefully the following change is a bit simpler and should make things work too (but I have not tested this). It just adds the desired output epub path/name as the final argument to the jar.
Code:
# process ODT file
if odt_file:
# assemble w2l command line
args = ['java', '-jar', w2l_path, '-' + output_format]
if os.path.isfile(w2l_config_path):
args.append('-config=' + w2l_config_path)
if os.path.isfile(w2l_css_path):
args.append('-stylesheet=' + w2l_css_path)
args.append(odt_file)
epub_path = os.path.splitext(odt_file)[0] + '.epub'
args.append(epub_path)
# run w2l
result = w2lWrapper(*args)