1
0
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:
Alexander Graf 2016-07-26 13:52:05 +02:00
parent 88219e4d01
commit 1f7fe4ca2f

View File

@ -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))