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)
|
||||
blogs = []
|
||||
for time, user, path in posts[:count]:
|
||||
# try:
|
||||
with open(path, "r", encoding="UTF-8") as f:
|
||||
body = f.read()
|
||||
# except
|
||||
try:
|
||||
with open(path, "r", encoding="UTF-8") as f:
|
||||
body = f.read()
|
||||
except PermissionError:
|
||||
continue
|
||||
obj = {
|
||||
"user": user,
|
||||
"time": time,
|
||||
|
Loading…
x
Reference in New Issue
Block a user