summaryrefslogtreecommitdiff
path: root/openvpn_otp.py
diff options
context:
space:
mode:
Diffstat (limited to 'openvpn_otp.py')
-rwxr-xr-xopenvpn_otp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/openvpn_otp.py b/openvpn_otp.py
index 321e69e..f673c8f 100755
--- a/openvpn_otp.py
+++ b/openvpn_otp.py
@@ -16,7 +16,7 @@ def main():
child.logfile = sys.stdout.buffer
child.expect("CHALLENGE: Verification code:")
child.sendline(
- mintotp.totp(Path(os.environ["OPENVPN_OTP_SECRET_FILE"]).read_text())
+ mintotp.totp(Path(os.environ["OPENVPN_OTP_SECRET_FILE"]).read_text().strip())
)
# macos - python script: pexpect hangs on child.wait()? - Stack Overflow
# https://stackoverflow.com/questions/58751357/python-script-pexpect-hangs-on-child-wait