OSDN Git Service

fix caption import error.
[rec10/rec10-git.git] / rec10 / trunk / src / tv2mp4.py
index c202c00..2275dfc 100644 (file)
@@ -196,9 +196,14 @@ def addmp4(padd,pout,cmd):#without video
     recdblist.addlog(pout, cmdn, u"MP4Box追加ログ-コマンド")\r
     recdblist.addlog(pout, txt, u"MP4Box追加ログ-詳細")\r
     time.sleep(5)\r
-    os.remove(ptoutb)\r
     shutil.move(ptadd,padd)\r
-    shutil.move(ptout,pout)\r
+    if os.path.exists(ptout):\r
+        shutil.move(ptout,pout)\r
+        os.remove(ptoutb)\r
+    else:\r
+        txtt=padd+u"のインポートエラー"\r
+        recdblist.addlog(pout, txtt, u"MP4Box追加ログ-コマンド")\r
+        shutil.move(ptoutb,pout)\r
     time.sleep(5)\r
 def execcomd(cmd):\r
     txt=""\r