get_request_status: return PR_UNKNOWN if request is unknown

This commit is contained in:
ThomasV 2016-02-15 04:59:20 +01:00
parent dcc59d6f70
commit b7c4492d3b
1 changed files with 3 additions and 1 deletions

View File

@ -1323,7 +1323,9 @@ class Abstract_Wallet(PrintError):
def get_request_status(self, key):
from paymentrequest import PR_PAID, PR_UNPAID, PR_UNKNOWN, PR_EXPIRED
r = self.receive_requests[key]
r = self.receive_requests.get(key)
if r is None:
return PR_UNKNOWN
address = r['address']
amount = r.get('amount')
timestamp = r.get('time', 0)