mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
payment: GetTipbotAddress now returns None when it fails
The display function will turn it into "ERROR"
This commit is contained in:
parent
d5ab3b88f5
commit
15c5d31dc7
1 changed files with 5 additions and 4 deletions
|
@ -25,15 +25,15 @@ def GetTipbotAddress():
|
||||||
j = SendWalletJSONRPCCommand("getaddress",None)
|
j = SendWalletJSONRPCCommand("getaddress",None)
|
||||||
if not "result" in j:
|
if not "result" in j:
|
||||||
log_error('GetTipbotAddress: No result found in getaddress reply')
|
log_error('GetTipbotAddress: No result found in getaddress reply')
|
||||||
return ERROR
|
return None
|
||||||
result = j["result"]
|
result = j["result"]
|
||||||
if not "address" in result:
|
if not "address" in result:
|
||||||
log_error('GetTipbotAddress: No address found in getaddress reply')
|
log_error('GetTipbotAddress: No address found in getaddress reply')
|
||||||
return ERROR
|
return None
|
||||||
return result["address"]
|
return result["address"]
|
||||||
except Exception,e:
|
except Exception,e:
|
||||||
log_error("GetTipbotAddress: Error retrieving %s's address: %s" % (config.tipbot_name, str(e)))
|
log_error("GetTipbotAddress: Error retrieving %s's address: %s" % (config.tipbot_name, str(e)))
|
||||||
return "ERROR"
|
return None
|
||||||
|
|
||||||
def UpdateCoin(data):
|
def UpdateCoin(data):
|
||||||
global last_wallet_update_time
|
global last_wallet_update_time
|
||||||
|
@ -108,7 +108,8 @@ def Deposit(link,cmd):
|
||||||
|
|
||||||
def Help(link):
|
def Help(link):
|
||||||
link.send_private("You can send %s to your account:" % coinspecs.name);
|
link.send_private("You can send %s to your account:" % coinspecs.name);
|
||||||
link.send_private(" Address: %s" % GetTipbotAddress())
|
address=GetTipbotAddress() or 'ERROR'
|
||||||
|
link.send_private(" Address: %s" % address)
|
||||||
link.send_private(" Payment ID: %s" % GetPaymentID(link))
|
link.send_private(" Payment ID: %s" % GetPaymentID(link))
|
||||||
|
|
||||||
RegisterModule({
|
RegisterModule({
|
||||||
|
|
Loading…
Reference in a new issue