mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 22:24:23 +01:00
Renamed constants and default file names for Pisa's private and public keys
This commit is contained in:
@@ -20,13 +20,13 @@ from pisa.appointment import Appointment
|
||||
|
||||
from apps.cli.blob import Blob
|
||||
from apps.cli.help import help_add_appointment, help_get_appointment
|
||||
from apps.cli import DEFAULT_PISA_API_SERVER, DEFAULT_PISA_API_PORT, PUBLIC_KEY_FILE
|
||||
from apps.cli import DEFAULT_PISA_API_SERVER, DEFAULT_PISA_API_PORT, PISA_PUBLIC_KEY
|
||||
|
||||
HTTP_OK = 200
|
||||
|
||||
logger = Logger("Client")
|
||||
|
||||
with open(PUBLIC_KEY_FILE, "r") as key_file:
|
||||
with open(PISA_PUBLIC_KEY, "r") as key_file:
|
||||
pubkey_pem = key_file.read().encode("utf-8")
|
||||
pisa_public_key = load_pem_public_key(pubkey_pem, backend=default_backend())
|
||||
|
||||
@@ -88,8 +88,6 @@ def add_appointment(args):
|
||||
try:
|
||||
r = requests.post(url=add_appointment_endpoint, json=appointment.to_json(), timeout=5)
|
||||
|
||||
print(r.text)
|
||||
|
||||
logger.info("{} (code: {}).".format(r.json(), r.status_code))
|
||||
|
||||
response_json = r.json()
|
||||
|
||||
Reference in New Issue
Block a user