Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_logger_warning(self):
logger.warning("warning message")
def __init__(self,option=None):
logger.warning(self.message)
if option:
logger.warning(option)
elif type(cmd) == type(Command.AddSignatory()):
return Command(add_signatory = cmd)
elif type(cmd) == type(Command.RemoveSignatory()):
return Command(remove_signaotory = cmd)
elif type(cmd) == type(Command.SetAccountQuorum()):
return Command(set_account_quorum = cmd)
elif type(cmd) == type(Command.CreateAsset()):
return Command(create_asset = cmd)
elif type(cmd) == type(Command.CreateDomain()):
return Command(create_domain = cmd)
elif type(cmd) == type(Command.AddAssetQuantity()):
return Command(add_asset_quantity = cmd)
elif type(cmd) == type(Command.TransferAsset()):
return Command(transfer_asset = cmd)
# TODO throw except
logger.warning("Not Command Type")
return False
def __init__(self,option=None):
logger.warning(self.message)
if option:
logger.warning(option)
def verify_amount(amount):
if amount2int(amount) == 0:
logger.warning("Stateless Amount 0 Error")
return False
return True
def wrap_query(query_payload,request):
if type(request) == type(GetAccount()):
query_payload.get_account.CopyFrom(request)
elif type(request) == type(GetSignatories()):
query_payload.get_signatories.CopyFrom(request)
elif type(request) == type(GetAccountAssets()):
query_payload.get_account_assets.CopyFrom(request)
elif type(request) == type(GetAccountTransactions()):
query_payload.get_account_transactions.CopyFrom(request)
elif type(request) == type(GetAccountAssetTransactions()):
query_payload.get_account_asset_transactions.CopyFrom(request)
elif type(request) == type(GetTransactions()):
query_payload.get_transactions.CopyFrom(request)
else:
logger.warning("Request Not Match ReqeustType")