Minor fixes

This commit is contained in:
Sergi Delgado Segura
2020-04-20 13:58:09 +02:00
parent 2c0c1e4c42
commit 5f7eb9df10
3 changed files with 3 additions and 4 deletions

View File

@@ -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"
) )

View File

@@ -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)

View File

@@ -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