changed lookup_rate() to non-public

This commit is contained in:
Jimbo77 2012-08-22 20:11:38 -07:00
parent 3f167cb650
commit 9fc4e1a1b1
1 changed files with 4 additions and 4 deletions

View File

@ -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__":