Don't show error in mkpodcastplaylist when pipe ends

main
Buddy Sandidge 10 years ago
parent 80abf9fa66
commit d9acf0a171

@ -5,6 +5,7 @@ largest file/directory. It searches directories, getting their size
and lists the first file in the largest direcotry.
"""
import errno
import os
import sys
@ -94,11 +95,15 @@ def main():
headfile = directories[0].get_head_file()
#headfile = headfile.replace('podcasts/', 'podcast/', 1)
#print headfile
try:
sys.stdout.write("%s\n" % headfile)
except IOError as e:
if e.errno == errno.EPIPE:
return
raise e
directories[0].remove_head_file()
if directories[0].num_files() == 0:
directories = directories[1:]
if __name__ == "__main__":
main()

Loading…
Cancel
Save