You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\>>> bool("string" or None) True
... where "string" -> api_key and None -> token = None (for default).
So, for use the Oauth session, we need both the variables (api_key and token != None), or no?
If we use the logic operation OR, one variable different of None alread is valid (if api_key != None and token = None) -> True in this condition, which causes the execution of the first block wrongly.
Now, users can use only api_key and secret_key, which causes o `self.oauth = None'.
So, in my opinion, the operation logic should be AND.
I am using the logic operation AND, and the code is running perfectly well.
Good Night! Thanks for you approve my pull request!
The text was updated successfully, but these errors were encountered:
fmarcolino
changed the title
To use the Oauth1 session, the logic is correct?
To use the Oauth1 session, Is the logic correct?
Dec 29, 2017
rbeuque74
added a commit
to rbeuque74/py-trello
that referenced
this issue
Dec 31, 2017
Fixessarumont#225
When TrelloClient initalise itself, it should look if token and
token_secret are provided to enable OAuth, otherwise, fallback to 3rd
authentication
Signed-off-by: Romain Beuque <[email protected]>
py-trello/trello/trelloclient.py
Line 41 in 8e5b696
py-trello/trello/trelloclient.py
Line 42 in 8e5b696
py-trello/trello/trelloclient.py
Line 43 in 8e5b696
py-trello/trello/trelloclient.py
Line 44 in 8e5b696
py-trello/trello/trelloclient.py
Line 45 in 8e5b696
py-trello/trello/trelloclient.py
Line 46 in 8e5b696
Try use in the Python Shell the bellow command:
\>>> bool("string" or None)
True
... where "string" -> api_key and None -> token = None (for default).
So, for use the Oauth session, we need both the variables (api_key and token != None), or no?
If we use the logic operation OR, one variable different of None alread is valid (if api_key != None and token = None) -> True in this condition, which causes the execution of the first block wrongly.
Now, users can use only api_key and secret_key, which causes o `self.oauth = None'.
So, in my opinion, the operation logic should be AND.
I am using the logic operation AND, and the code is running perfectly well.
Good Night! Thanks for you approve my pull request!
The text was updated successfully, but these errors were encountered: