From 48d4fe233225db8857cd7afcb76819317856daa4 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 8 Feb 2011 13:00:56 +0000 Subject: [PATCH] Process .mailcap - replace 'mplay' with 'mplayer'. git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@121 7bb0bf08-9e0d-0410-b083-99cee3bf18b8 --- dotfiles2html/dotfiles2html.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dotfiles2html/dotfiles2html.py b/dotfiles2html/dotfiles2html.py index e7c3a41..5359b43 100755 --- a/dotfiles2html/dotfiles2html.py +++ b/dotfiles2html/dotfiles2html.py @@ -78,11 +78,11 @@ def process_dotfile(i, fname, ftype, file_types): file.write(text.replace('', '')) file.close() - elif fname == 'menu' and os.path.exists(fname): - file = open('menu', 'r') + elif fname in('mailcap', 'menu') and os.path.exists(fname): + file = open(fname, 'r') text = file.read() file.close() - file = open('menu', 'w') + file = open(fname, 'w') text = text.replace('mplay', 'mplayer') text = text.replace('mplayerer', 'mplayer') file.write(text) -- 2.39.5