Flake8 errors corrected
Corrected all errors given by Flake8 except line length
This commit is contained in:
parent
a74f4f3feb
commit
cb0acf7ea6
4
TODO
4
TODO
@ -2,7 +2,3 @@ What happen when a file is moved with git ?
|
|||||||
Flake8 the whole thing ! :)
|
Flake8 the whole thing ! :)
|
||||||
basepath ?
|
basepath ?
|
||||||
tags / smileys / ...
|
tags / smileys / ...
|
||||||
|
|
||||||
Known bugs:
|
|
||||||
==========
|
|
||||||
* Test RSS in Firefox (different view than traditionnal RSS view ?)
|
|
||||||
|
@ -11,6 +11,7 @@ import subprocess
|
|||||||
|
|
||||||
from time import gmtime, strftime, mktime
|
from time import gmtime, strftime, mktime
|
||||||
|
|
||||||
|
|
||||||
def isset(variable):
|
def isset(variable):
|
||||||
return variable in locals() or variable in globals()
|
return variable in locals() or variable in globals()
|
||||||
|
|
||||||
@ -508,7 +509,7 @@ for i in years_list:
|
|||||||
|
|
||||||
articles_list = list_directory("gen/"+i+"/"+j)
|
articles_list = list_directory("gen/"+i+"/"+j)
|
||||||
articles_list.sort(key=lambda x: os.stat(x).st_mtime, reverse=True)
|
articles_list.sort(key=lambda x: os.stat(x).st_mtime, reverse=True)
|
||||||
for article in articles_list:
|
for article in articles_list:
|
||||||
try:
|
try:
|
||||||
with open(article, "r") as article_fh:
|
with open(article, "r") as article_fh:
|
||||||
article_content = article_fh.read()
|
article_content = article_fh.read()
|
||||||
@ -517,13 +518,12 @@ for i in years_list:
|
|||||||
except IOError:
|
except IOError:
|
||||||
sys.exit("[ERROR] Error while generating years and months pages. Check your gen folder, you may need to regenerate some articles. The error was due to "+article+".")
|
sys.exit("[ERROR] Error while generating years and months pages. Check your gen folder, you may need to regenerate some articles. The error was due to "+article+".")
|
||||||
|
|
||||||
|
|
||||||
page_month += footer_gen
|
page_month += footer_gen
|
||||||
try:
|
try:
|
||||||
with open("blog/"+i+"/"+j+"/index.html", "w") as page_month_fh:
|
with open("blog/"+i+"/"+j+"/index.html", "w") as page_month_fh:
|
||||||
page_month_fh.write(page_month)
|
page_month_fh.write(page_month)
|
||||||
except IOError:
|
except IOError:
|
||||||
sys.exit("[ERROR] Unable to write index file for "+i+"/"+j+".")
|
sys.exit("[ERROR] Unable to write index file for "+i+"/"+j+".")
|
||||||
|
|
||||||
page_year += footer_gen
|
page_year += footer_gen
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user