add check for permission errors
This commit is contained in:
parent
26eec98680
commit
d17d9ccf09
9
bink.py
9
bink.py
@ -72,10 +72,11 @@ def generate_feed(before=None, count=200):
|
|||||||
posts.sort(key=lambda x: x[0], reverse=True)
|
posts.sort(key=lambda x: x[0], reverse=True)
|
||||||
blogs = []
|
blogs = []
|
||||||
for time, user, path in posts[:count]:
|
for time, user, path in posts[:count]:
|
||||||
# try:
|
try:
|
||||||
with open(path, "r", encoding="UTF-8") as f:
|
with open(path, "r", encoding="UTF-8") as f:
|
||||||
body = f.read()
|
body = f.read()
|
||||||
# except
|
except PermissionError:
|
||||||
|
continue
|
||||||
obj = {
|
obj = {
|
||||||
"user": user,
|
"user": user,
|
||||||
"time": time,
|
"time": time,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user