X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;ds=sidebyside;f=dotfiles2html%2Fdotfiles2html.py;h=640aa6a2ac9a579c8e2625748dc731071d83437c;hb=b1492b5836aead48044b51e9ba114c641669c6b6;hp=38f9a317165f2c09e8c0894c703feb8c764aacad;hpb=bdb237d2e9b6e556c847764355b415b9e79bdd93;p=phdru.name%2Fphdru.name.git diff --git a/dotfiles2html/dotfiles2html.py b/dotfiles2html/dotfiles2html.py index 38f9a31..640aa6a 100755 --- a/dotfiles2html/dotfiles2html.py +++ b/dotfiles2html/dotfiles2html.py @@ -3,7 +3,9 @@ __author__ = "Oleg Broytman " __copyright__ = "Copyright (C) 2004-2020 PhiloSoft Design" -import os, shutil, filecmp +import filecmp +import os +import shutil os.umask(0022) # octal; -rw-r--r-- from m_lib.m_path import get_homedir @@ -73,7 +75,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 +89,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()