From 26920a30b2101ec4dce1778a0fd06e859f3f44d5 Mon Sep 17 00:00:00 2001 From: Miguel Angel Ajo Date: Fri, 29 Jun 2018 09:59:10 +0200 Subject: [PATCH] Convert the otp value to ascii from unicode Othersise the clipboard library fails in my system because it's not expecting unicode. --- softtoken/softtoken.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softtoken/softtoken.py b/softtoken/softtoken.py index 3257cff..57afbd4 100644 --- a/softtoken/softtoken.py +++ b/softtoken/softtoken.py @@ -156,7 +156,7 @@ def main(): k = PyKeyboard() k.type_string(otp) elif args.copy_clipboard: - pyperclip.copy(otp) + pyperclip.copy(otp.encode('ascii')) else: print(otp)