From: W. Trevor King Date: Tue, 16 Nov 2010 16:12:25 +0000 (-0500) Subject: Cleanup tmp files during mkogg.py testing. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4cdd0400e5813ea4248977d7d05a3d806cabf33e;p=mw2txt.git Cleanup tmp files during mkogg.py testing. --- diff --git a/posts/mkogg/mkogg.py b/posts/mkogg/mkogg.py index f6a0d29..3203b30 100755 --- a/posts/mkogg/mkogg.py +++ b/posts/mkogg/mkogg.py @@ -132,6 +132,7 @@ class Converter (object): ['2010', '11', None] >>> c._parse_date('2010-11-16') ['2010', '11', '16'] + >>> c.cleanup() """ fields = date.split('-') assert len(fields) > 0 and len(fields) <= 3, date @@ -165,6 +166,7 @@ class Converter (object): 'title': 'The Famous Song', 'tracknumber': '07', 'tracktotal': '14'} + >>> c.cleanup() """ metadata = {} vorbis_keys = { @@ -217,6 +219,7 @@ class Converter (object): 'title': 'The Famous Song', 'tracknumber': '07', 'tracktotal': '14'} + >>> c.cleanup() """ metadata = {} for line in stdout.splitlines(): @@ -334,11 +337,11 @@ if __name__ == '__main__': help='Run internal tests and exit') options,args = p.parse_args() - source_dir,target_dir = args if options.test: sys.exit(test()) + source_dir,target_dir = args c = Converter(source_dir, target_dir, target_extension=options.ext) try: c.run()