ts2mkv.py

changeset 30
6eaf5e9c6968
parent 27
a2951f7c435e
child 34
344802cf307d
--- a/ts2mkv.py	Tue Dec 12 03:01:50 2017 +0100
+++ b/ts2mkv.py	Tue Dec 12 03:02:25 2017 +0100
@@ -530,7 +530,12 @@
                 print "Moving processed files from %s to %s" % (
                     mvsource, mvtarget)
                 if not args.dryrun:
-                    os.makedirs(mvtarget)
+                    try:
+                        os.makedirs(mvtarget)
+                    except OSError, e:
+                        if e.errno != os.errno.EEXIST:
+                            raise
+                        pass
                 for mvsrc in mvlist:
                     mvfn = os.path.basename(mvsrc)
                     if os.path.splitext(mvfn)[1] in ['.txt', '.mkv', '.nfo']:

mercurial