Tue, 12 Dec 2017 03:02:25 +0100
bugfix: mkdir exists
ts2mkv.py | file | annotate | diff | comparison | revisions |
--- 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']: