Skip to content

Commit ea0fafc

Browse files
authored
fix err when kj is None (#33)
1 parent c000b00 commit ea0fafc

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

learn_async.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,14 @@ def sync_file(c):
330330
except: # None
331331
return
332332

333-
rows = json.loads(
334-
get_page(
335-
f'/b/wlxt/kj/wlkc_kjflb/{c["_type"]}/pageList?_csrf={get_xsrf_token()}&wlkcid={c["wlkcid"]}'
336-
)
337-
)["object"]["rows"]
333+
try:
334+
rows = json.loads(
335+
get_page(
336+
f'/b/wlxt/kj/wlkc_kjflb/{c["_type"]}/pageList?_csrf={get_xsrf_token()}&wlkcid={c["wlkcid"]}'
337+
)
338+
)["object"]["rows"]
339+
except: # None
340+
return
338341

339342
os.chdir(pre)
340343
for r in rows:

0 commit comments

Comments
 (0)