changed lookup_rate() to non-public
This commit is contained in:
parent
3f167cb650
commit
9fc4e1a1b1
|
@ -40,16 +40,16 @@ class Exchanger(threading.Thread):
|
||||||
# 4 = BTC:PLN
|
# 4 = BTC:PLN
|
||||||
quote_currencies = {}
|
quote_currencies = {}
|
||||||
try:
|
try:
|
||||||
quote_currencies["GBP"] = self.lookup_rate(response, 1)
|
quote_currencies["GBP"] = self._lookup_rate(response, 1)
|
||||||
quote_currencies["EUR"] = self.lookup_rate(response, 2)
|
quote_currencies["EUR"] = self._lookup_rate(response, 2)
|
||||||
quote_currencies["USD"] = self.lookup_rate(response, 3)
|
quote_currencies["USD"] = self._lookup_rate(response, 3)
|
||||||
with self.lock:
|
with self.lock:
|
||||||
self.quote_currencies = quote_currencies
|
self.quote_currencies = quote_currencies
|
||||||
self.parent.emit(SIGNAL("refresh_balance()"))
|
self.parent.emit(SIGNAL("refresh_balance()"))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def lookup_rate(self, response, quote_id):
|
def _lookup_rate(self, response, quote_id):
|
||||||
return decimal.Decimal(response[str(quote_id)]["last"])
|
return decimal.Decimal(response[str(quote_id)]["last"])
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in New Issue