]> git.phdru.name Git - phdru.name/phdru.name.git/commitdiff
Refactor(dotfiles2html): Remove duplicate checks
authorOleg Broytman <phd@phdru.name>
Fri, 21 Aug 2020 07:32:36 +0000 (10:32 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 21 Aug 2020 07:32:36 +0000 (10:32 +0300)
dotfiles2html/dotfiles2html.py

index 38f9a317165f2c09e8c0894c703feb8c764aacad..cc7a59b1d4f6ef1b5085f07962f56986f0bf326f 100755 (executable)
@@ -73,7 +73,7 @@ def process_dotfile(i, fname, ftype, file_types):
     if not os.path.exists(fname):
         return
 
     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()
         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()
 
         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()
         file = open('vimrc', 'r')
         text = file.read()
         file.close()