Handle ValueError on bad profile id file

Fixes "ValueError: invalid literal for int() with base 10: b''", reported in #95.
This commit is contained in:
Alexander Graf 2018-05-01 15:14:19 +02:00
parent 2722da6ae4
commit 084cfb102c

View File

@ -643,7 +643,7 @@ class Instaloader:
'{0}/{1}_id'.format(self.dirname_pattern.format(), newname.lower()))
return profile_from_id
return profile
except FileNotFoundError:
except (FileNotFoundError, ValueError):
pass
if profile_exists:
os.makedirs(self.dirname_pattern.format(profile=profile_name.lower(),