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:
1 parent
2722da6ae4
commit
084cfb102c
1 file changed
+1
-1
@@ -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(),
|
||||
|
||||
Reference in new issue
Block a user