diff options
| author | Adam Tauber <asciimoo@gmail.com> | 2016-07-11 14:29:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-11 14:29:19 +0200 |
| commit | 3fd405dcd3fd46d5b6f2fe1df625eedf0f1fbe02 (patch) | |
| tree | e687d42371677ab042772f13d4fe646a2e4fff7a /utils | |
| parent | a92493a0de5696a10fb3583c4e65d2f7756c389b (diff) | |
| parent | 4261a41c1b8cf282132fc0159fbf21bf567b3b10 (diff) | |
Merge pull request #618 from stepshal/comparison
Comparison to None should be 'if cond is not None:'
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/fetch_currencies.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/fetch_currencies.py b/utils/fetch_currencies.py index ebd0895a3..3ca8fcfd7 100644 --- a/utils/fetch_currencies.py +++ b/utils/fetch_currencies.py @@ -84,7 +84,7 @@ def parse_currency(data): labels = data.get('labels', {}) for language in languages: name = labels.get(language, {}).get('value', None) - if name != None: + if name is not None: add_currency_name(name, iso4217) add_currency_label(name, iso4217, language) @@ -126,7 +126,7 @@ def wdq_query(query): jsonresponse = json.loads(htmlresponse.content) qlist = map(add_q, jsonresponse.get('items', {})) error = jsonresponse.get('status', {}).get('error', None) - if error != None and error != 'OK': + if error is not None and error != 'OK': print "error for query '" + query + "' :" + error fetch_data_batch(qlist) |