FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Revert "Merge pull request #102 from MicroPyramid/Currency_Rates_Source_Not_Ready" by Robbie-Palmer · Pull Request #105 · MicroPyramid/forex-python · GitHub

Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
5 changes: 3 additions & 2 deletions forex_python/converter.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ def _decode_rates(self, response, use_decimal=False, date_str=None):
decoded_data = json.loads(response.text, use_decimal=True)
else:
decoded_data = response.json()
# if (date_str and date_str != 'latest' and date_str != decoded_data.get('date')):
# raise RatesNotAvailableError("Currency Rates Source Not Ready")
if (date_str and date_str != 'latest'
and date_str != decoded_data.get('date')):
raise RatesNotAvailableError("Currency Rates Source Not Ready")
return decoded_data.get('rates', {})

def _get_decoded_rate(
Expand Down

Back | FazBrowse Home | New Git URL