add prefix for messages
This commit is contained in:
parent
62647c4a2b
commit
7c1cc2f538
@ -8,6 +8,8 @@ from smartcard.util import toHexString
|
|||||||
|
|
||||||
from card_reader import read_card
|
from card_reader import read_card
|
||||||
|
|
||||||
|
CLIPBOARD_MESSAGE_PREFIX = "ezgglan-clipboard-message:"
|
||||||
|
|
||||||
|
|
||||||
class ClipboardReaderService:
|
class ClipboardReaderService:
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
@ -44,9 +46,9 @@ class ClipboardReaderService:
|
|||||||
user_id = read_card(connection)
|
user_id = read_card(connection)
|
||||||
|
|
||||||
if user_id is not None:
|
if user_id is not None:
|
||||||
pyperclip.copy(str(user_id))
|
pyperclip.copy(CLIPBOARD_MESSAGE_PREFIX + str(user_id))
|
||||||
else:
|
else:
|
||||||
pyperclip.copy("Fehler: Erneut scannen")
|
pyperclip.copy(CLIPBOARD_MESSAGE_PREFIX + "Fehler: Erneut scannen")
|
||||||
|
|
||||||
except CardConnectionException:
|
except CardConnectionException:
|
||||||
pass
|
pass
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user