Skip to content

Commit

Permalink
Do not wait for new 2FA code on successful login
Browse files Browse the repository at this point in the history
Because we use TOTP 2FA in testing we were waiting
for a new 2FA code after successful login. Remove
this now it is a generic library
  • Loading branch information
martinraiberfc committed Oct 24, 2024
1 parent 12d8614 commit 1ba675b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
14 changes: 0 additions & 14 deletions filecloudapi/fcserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,6 @@ def login(self) -> None:
},
)

ok = int(resp.findtext("./command/result", "0")) == 1

if ok:
# We need a new code for the next login
while code == self.twofakeyfun():
time.sleep(1)

self._raise_exception_from_command(resp)

def login_as_admin(self) -> None:
Expand Down Expand Up @@ -220,13 +213,6 @@ def login_as_admin(self) -> None:
},
)

ok = int(resp.findtext("./command/result", "0")) == 1

if ok:
# We need a new code for the next login
while code == self.twofakeyfun():
time.sleep(1)

self._raise_exception_from_command(resp)

def _parseEntry(self, entry: ET.Element) -> FileListEntry:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]

name = "filecloudapi-python"
version = "0.1.1"
version = "0.1.2"
description = "A Python library to connect to a Filecloud server"

packages = [{ include = "filecloudapi" }]
Expand Down

0 comments on commit 1ba675b

Please sign in to comment.