Browse Source

adjust

master
Gitea 5 years ago
parent
commit
ef3d42be99
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      video.py

+ 1
- 2
video.py View File

@@ -34,13 +34,12 @@ def convert(origin, target):
# status, output = sp.getstatusoutput(cmd)
# print("status:: {0}, output {1}".format(status, output))
proc = sp.Popen(args, stdin=sp.PIPE, stdout=sp.PIPE, stderr=sp.PIPE)
y = b'y'
answer = 'Overwrite ? [y/N]'
try:
outs, errs = proc.communicate(timeout=300)
print(outs, errs)
if answer in outs:
proc.stdin.write(y)
proc.stdin.write(b'y')
if proc.returncode == 0:
print("{0} convert {1} Success, origin dat will remove!".format(origin, target))
os.remove(origin)


Loading…
Cancel
Save