Skip to content

Fixed syntax warning #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions poynt/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _naked_request(self, method, url, json=None, headers=None, form=None,

headers = self._request_headers()
method = method or 'GET'
url_root = self.web_root if app is 'WEB' else self.api_root
url_root = self.web_root if app == 'WEB' else self.api_root

if form:
r = self.session.request(
Expand Down Expand Up @@ -207,7 +207,7 @@ def request(self, method, url, json=None, headers=None, form=None,
app=app,
)

if status_code is 401 and json is not None and json['code'] is 'INVALID_ACCESS_TOKEN':
if status_code == 401 and json is not None and json['code'] == 'INVALID_ACCESS_TOKEN':
return self.request(
method=method,
url=url,
Expand Down