]> git.phdru.name Git - phdru.name/phdru.name.git/blobdiff - dotfiles2html/dotfiles2html.py
Refactor(dotfiles2html): Fix import
[phdru.name/phdru.name.git] / dotfiles2html / dotfiles2html.py
index 38f9a317165f2c09e8c0894c703feb8c764aacad..640aa6a2ac9a579c8e2625748dc731071d83437c 100755 (executable)
@@ -3,7 +3,9 @@
 __author__ = "Oleg Broytman <phd@phdru.name>"
 __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()