mirror of
https://github.com/gryf/softtoken.git
synced 2025-12-21 05:17:59 +01:00
Import PyKeyboard only when necessary
Some systems have issues installing the PyKeyboard/Quartz properly, like my OSX for some weird reason...
This commit is contained in:
committed by
Daniel Alvarez
parent
d055730b9f
commit
b441781351
@@ -20,8 +20,6 @@ import sys
|
|||||||
from os import path
|
from os import path
|
||||||
from os import urandom
|
from os import urandom
|
||||||
|
|
||||||
from pykeyboard import PyKeyboard
|
|
||||||
|
|
||||||
import pyotp
|
import pyotp
|
||||||
|
|
||||||
import pyperclip
|
import pyperclip
|
||||||
@@ -154,6 +152,7 @@ def main():
|
|||||||
otp = totp.now()
|
otp = totp.now()
|
||||||
|
|
||||||
if args.print_focus:
|
if args.print_focus:
|
||||||
|
from pykeyboard import PyKeyboard
|
||||||
k = PyKeyboard()
|
k = PyKeyboard()
|
||||||
k.type_string(otp)
|
k.type_string(otp)
|
||||||
elif args.copy_clipboard:
|
elif args.copy_clipboard:
|
||||||
|
|||||||
Reference in New Issue
Block a user