First Object then File Pointer

json.dump() receives object as first argument and File Pointer as 2nd argument.
This commit is contained in:
Abdullah Zayed
2020-04-28 12:58:19 +06:00
committed by GitHub
parent af3758c8a9
commit 93b71bf198

View File

@@ -18,7 +18,7 @@ def load_cookies(filename):
def save_cookies(filename, cookies):
with open(filename, "w") as f:
json.dump(f, cookies)
json.dump(cookies, f)
def load_session(cookies):