Skip to content

Commit

Permalink
Detect if username/password not set and login required
Browse files Browse the repository at this point in the history
  • Loading branch information
ping committed Feb 28, 2017
1 parent 661eb0f commit eb83278
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions instagram_private_api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ def __init__(self, username, password, **kwargs):
self.opener = opener

if not cookie_string: # or not self.token or not self.rank_token:
if not self.username or not self.password:
raise ClientLoginRequiredError('login_required', code=400)
self.login()

@property
Expand Down

0 comments on commit eb83278

Please sign in to comment.