def fromaccount1(accountno, amount): if not Dbase.hasAccountBalance(accountno, amount): raise Exception('Not enough balance in your account')
def fromaccount(accountno, amount): if not Dbase.hasAccountBalance(accountno, amount): response = make_response( json.dumps('Not enough balance in your account'), 400) response.headers['Content-Type'] = 'application/json' return response