From b44178135102f52458a60131dafd9156c5a90a94 Mon Sep 17 00:00:00 2001 From: Miguel Angel Ajo Date: Fri, 29 Jun 2018 09:58:32 +0200 Subject: [PATCH] Import PyKeyboard only when necessary Some systems have issues installing the PyKeyboard/Quartz properly, like my OSX for some weird reason... --- softtoken/softtoken.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/softtoken/softtoken.py b/softtoken/softtoken.py index 64c4ead..3257cff 100644 --- a/softtoken/softtoken.py +++ b/softtoken/softtoken.py @@ -20,8 +20,6 @@ import sys from os import path from os import urandom -from pykeyboard import PyKeyboard - import pyotp import pyperclip @@ -154,6 +152,7 @@ def main(): otp = totp.now() if args.print_focus: + from pykeyboard import PyKeyboard k = PyKeyboard() k.type_string(otp) elif args.copy_clipboard: