|
|
@@ -37,10 +37,11 @@ def convert(origin, target): |
|
|
|
answer = 'Overwrite ? [y/N]'
|
|
|
|
try:
|
|
|
|
outs, errs = proc.communicate(timeout=300)
|
|
|
|
print(outs, errs)
|
|
|
|
if answer in outs:
|
|
|
|
proc.stdin.write(b'y')
|
|
|
|
if proc.returncode == 0:
|
|
|
|
ret_info = str(outs, encoding='utf-8')
|
|
|
|
print(ret_info, errs)
|
|
|
|
if answer in ret_info:
|
|
|
|
proc.stdin.write(b'y')
|
|
|
|
elif proc.returncode == 0:
|
|
|
|
print("{0} convert {1} Success, origin dat will remove!".format(origin, target))
|
|
|
|
os.remove(origin)
|
|
|
|
else:
|
|
|
|