Moves cli conf options to __init__.py so it can be run standalone

This commit is contained in:
Sergi Delgado Segura
2019-07-10 12:30:06 +01:00
parent 88ae640417
commit d1c5b3dd6a
3 changed files with 11 additions and 4 deletions

View File

@@ -1,2 +1,10 @@
# PISA-SERVER
DEFAULT_PISA_API_SERVER = 'localhost'
DEFAULT_PISA_API_PORT = 9814
# PISA-CLI
CLIENT_LOG_FILE = 'pisa.log'
# CRYPTO
SUPPORTED_HASH_FUNCTIONS = ["SHA256"]
SUPPORTED_CIPHERS = ["AES-GCM-128"]

View File

@@ -1,7 +1,7 @@
from binascii import hexlify, unhexlify
from hashlib import sha256
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
from conf import SUPPORTED_HASH_FUNCTIONS, SUPPORTED_CIPHERS
from apps.cli import SUPPORTED_HASH_FUNCTIONS, SUPPORTED_CIPHERS
class Blob:

View File

@@ -6,12 +6,11 @@ import logging
import requests
from sys import argv
from getopt import getopt, GetoptError
from conf import CLIENT_LOG_FILE
from hashlib import sha256
from binascii import unhexlify
from apps.cli.blob import Blob
from requests import ConnectTimeout, ConnectionError
from apps.cli import DEFAULT_PISA_API_SERVER, DEFAULT_PISA_API_PORT
from apps.cli import DEFAULT_PISA_API_SERVER, DEFAULT_PISA_API_PORT, CLIENT_LOG_FILE
from apps.cli.help import help_add_appointment, help_get_appointment