From: Oleg Broytman Date: Fri, 21 Aug 2020 07:32:36 +0000 (+0300) Subject: Refactor(dotfiles2html): Remove duplicate checks X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=1658db6dd94c15f5e1b01b70b16da8a10e22ae39;p=phdru.name%2Fphdru.name.git Refactor(dotfiles2html): Remove duplicate checks --- diff --git a/dotfiles2html/dotfiles2html.py b/dotfiles2html/dotfiles2html.py index 38f9a31..cc7a59b 100755 --- a/dotfiles2html/dotfiles2html.py +++ b/dotfiles2html/dotfiles2html.py @@ -73,7 +73,7 @@ def process_dotfile(i, fname, ftype, file_types): if not os.path.exists(fname): return - if fname in ('mailcap', 'mc.ext', 'menu') and os.path.exists(fname): + if fname in ('mailcap', 'mc.ext', 'menu'): file = open(fname, 'r') text = file.read() file.close() @@ -87,7 +87,7 @@ def process_dotfile(i, fname, ftype, file_types): file.write(text) file.close() - elif fname == 'vimrc' and os.path.exists(fname): + elif fname == 'vimrc': file = open('vimrc', 'r') text = file.read() file.close()