on master help sign in
Comparison to None should be 'if cond is not None:'
commit4261a41c1b8cf282132fc0159fbf21bf567b3b10 authorstepshal <nessento@openmailbox.org> dateMon 11 Jul 2016, 19:17 (10 years ago) parenta92493a
1 file changed+2−2
utils/fetch_currencies.py+2−2
utils/fetch_currencies.py+2−2
@@ -84,7 +84,7 @@ def parse_currency(data):
8484 labels = data.get('labels', {})
8585 for language in languages:
8686 name = labels.get(language, {}).get('value', None)
87− if name != None:
87+ if name is not None:
8888 add_currency_name(name, iso4217)
8989 add_currency_label(name, iso4217, language)
9090
@@ -126,7 +126,7 @@ def wdq_query(query):
126126 jsonresponse = json.loads(htmlresponse.content)
127127 qlist = map(add_q, jsonresponse.get('items', {}))
128128 error = jsonresponse.get('status', {}).get('error', None)
129− if error != None and error != 'OK':
129+ if error is not None and error != 'OK':
130130 print "error for query '" + query + "' :" + error
131131
132132 fetch_data_batch(qlist)