mirror of
https://github.com/instaloader/instaloader.git
synced 2024-11-05 01:42:29 +01:00
load_session: don't double check if file can be opened
This commit is contained in:
parent
88219e4d01
commit
1f7fe4ca2f
@ -145,7 +145,6 @@ def save_session(session, filename, quiet=False):
|
|||||||
def load_session(filename, quiet=False):
|
def load_session(filename, quiet=False):
|
||||||
if filename is None:
|
if filename is None:
|
||||||
filename = DEFAULTSESSIONFILE
|
filename = DEFAULTSESSIONFILE
|
||||||
if os.path.isfile(filename):
|
|
||||||
with open(filename, 'rb') as sessionfile:
|
with open(filename, 'rb') as sessionfile:
|
||||||
session = requests.Session()
|
session = requests.Session()
|
||||||
session.cookies = requests.utils.cookiejar_from_dict(pickle.load(sessionfile))
|
session.cookies = requests.utils.cookiejar_from_dict(pickle.load(sessionfile))
|
||||||
|
Loading…
Reference in New Issue
Block a user