Exemple #1
0
 def __init__(self, plugin, handler):
     if not LIBS_AVAILABLE:
         self.print_error("** No libraries available")
         return
     self.print_error("__init__()")#debugSatochip
     self.device = plugin.device
     self.handler = handler
     #self.parser= CardDataParser()
     #self.cc= CardConnector(self, _logger.getEffectiveLevel())
     self.cc= CardConnector(self)
     if is_verbose:
         logger.setLevel(logging.DEBUG)
     else:
         logger.setLevel(logging.INFO)
Exemple #2
0
    # print("Import exception for eth_keys")
    # print(repr(e))

if (len(sys.argv)>=2) and (sys.argv[1]in ['-v', '--verbose']):
    logging.basicConfig(level=logging.DEBUG, format='%(levelname)s [%(module)s] %(funcName)s | %(message)s')
else:
    logging.basicConfig(level=logging.INFO, format='%(levelname)s [%(module)s] %(funcName)s | %(message)s')
logger = logging.getLogger(__name__)
#logger.setLevel(logging.DEBUG)

logger.warning("loglevel: "+ str(logger.getEffectiveLevel()) )

#handler= HandlerTxt()
handler= HandlerSimpleGUI(logger.getEffectiveLevel())
client= Client(None, handler, logger.getEffectiveLevel())
cc = CardConnector(client, logger.getEffectiveLevel())
status= None
wallets = {}

EXIT_SUCCESS=0
EXIT_FAILURE=1
             
# TODO list:
# authentikey image
# Daemon mode
# logging & versioning
# DONE: Support 2FA
# DONE Check origin and host (+ whitelist?)
# DONE GUI
# DONE Satochip initialization