mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 14:14:22 +01:00
Minor fixes
This commit is contained in:
@@ -59,7 +59,7 @@ def help_get_all_appointments():
|
|||||||
"NAME:"
|
"NAME:"
|
||||||
"\tpython teos_cli get_all_appointments - Gets information about all appointments stored in the tower."
|
"\tpython teos_cli get_all_appointments - Gets information about all appointments stored in the tower."
|
||||||
"\n\nUSAGE:"
|
"\n\nUSAGE:"
|
||||||
"\tpython teos_cli get_all_appointments"
|
"\tpython teos_cli.py get_all_appointments"
|
||||||
"\n\nDESCRIPTION:"
|
"\n\nDESCRIPTION:"
|
||||||
"\n\n\tGets information about all appointments stored in the tower.\n"
|
"\n\n\tGets information about all appointments stored in the tower.\n"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ def get_all_appointments(teos_url):
|
|||||||
Gets information about all appointments stored in the tower, if the user requesting the data is an administrator.
|
Gets information about all appointments stored in the tower, if the user requesting the data is an administrator.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
get_all_appointments_endpoint (:obj:`str`): the teos endpoint from which all appointments can be retrieved.
|
teos_url (:obj:`str`): the teos base url.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
:obj:`dict` a dictionary containing all the appointments stored by the Responder and Watcher if the tower
|
:obj:`dict` a dictionary containing all the appointments stored by the Responder and Watcher if the tower
|
||||||
@@ -193,7 +193,7 @@ def get_all_appointments(teos_url):
|
|||||||
response = requests.get(url=get_all_appointments_endpoint, timeout=5)
|
response = requests.get(url=get_all_appointments_endpoint, timeout=5)
|
||||||
|
|
||||||
if response.status_code != constants.HTTP_OK:
|
if response.status_code != constants.HTTP_OK:
|
||||||
logger.error("The server returned a 'not found' error")
|
logger.error("The server returned an error", status_code=response.status_code, reason=response.reason)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
response_json = json.dumps(response.json(), indent=4, sort_keys=True)
|
response_json = json.dumps(response.json(), indent=4, sort_keys=True)
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import responses
|
|||||||
from binascii import hexlify
|
from binascii import hexlify
|
||||||
from coincurve import PrivateKey
|
from coincurve import PrivateKey
|
||||||
from requests.exceptions import ConnectionError, Timeout
|
from requests.exceptions import ConnectionError, Timeout
|
||||||
from http.client import HTTPException
|
|
||||||
|
|
||||||
import common.cryptographer
|
import common.cryptographer
|
||||||
from common.logger import Logger
|
from common.logger import Logger
|
||||||
|
|||||||
Reference in New Issue
Block a user