Skip to content
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

Flag logged after actual login #59

Open
wants to merge 1 commit 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
2 changes: 1 addition & 1 deletion fortiosapi/fortiosapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ def tokenlogin(self, host, apitoken, verify=True, cert=None, timeout=12, vdom="g
self._session = requests.session()
# may happen at start or if logout is called
self._session.headers.update({'Authorization': 'Bearer ' + apitoken})
self._logged = True
LOG.debug("self._https is %s", self._https)
if not self._https:
self.url_prefix = 'http://' + self.host
Expand All @@ -211,6 +210,7 @@ def tokenlogin(self, host, apitoken, verify=True, cert=None, timeout=12, vdom="g
resp_lic = self.get('system', 'status', vdom=vdom)
LOG.debug("response system/status : %s", resp_lic)
self._fortiversion = resp_lic['version']
self._logged = True
return True

def get_version(self):
Expand Down