Changeset bdc38391e869150773124fd0afe1027671146cc6
- Timestamp:
- 07/29/11 11:29:49 (10 months ago)
- Children:
- 721e76160f9384fb67bb7844b1ecefe4d9b8cfd1
- Parents:
- b353777e30837cddb30ae89a91209cabb59218be
- git-committer:
- Luper Rouch <luper.rouch@…> (07/29/11 11:29:49)
- File:
-
- 1 edited
-
utils/avi2mkv/src/avi2mkv/__init__.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
utils/avi2mkv/src/avi2mkv/__init__.py
rb353777 rbdc3839 5 5 import multiprocessing 6 6 import tempfile 7 import sys 7 8 from avi2mkv import subrip 8 9 … … 13 14 14 15 *args* must be a pair containing *(input_files, options)*. *options* must 15 be an object containing the command line arguments parsed by argparse. 16 be an object containing the command line arguments parsed by 17 :mod:`argparse`. 16 18 """ 17 19 input_file, options = args … … 22 24 subtitles_file = root + ".srt" 23 25 if not options.quiet: 24 print "Found subtitles file '%s'" % subtitles_file26 sys.stdout.write("Found subtitles file '%s'\n" % subtitles_file) 25 27 else: 26 28 subtitles_file = None … … 63 65 kwargs = {} 64 66 if not options.quiet: 65 print "Muxing '%s' to '%s'..." % (input_file, output_file) 67 sys.stdout.write("Muxing '%s' to '%s'...\n" % 68 (input_file, output_file)) 66 69 else: 67 70 fnull = open(os.devnull, "w") 68 71 kwargs["stdout"] = fnull 69 72 kwargs["stderr"] = fnull 70 subprocess.call(args, **kwargs) 73 try: 74 subprocess.check_call(args, **kwargs) 75 except subprocess.CalledProcessError, err: 76 sys.stderr.write("Error muxing '%s', mkvmerge exited with error " 77 "code %s" % (input_file, err.returncode)) 71 78 72 79
Note: See TracChangeset
for help on using the changeset viewer.
