aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-02-04 17:22:20 -0800
committerBryan Newbold <bnewbold@robocracy.org>2020-02-04 17:22:22 -0800
commit88edf4cb81a5afd7f469358eaee73affa75c72c2 (patch)
treeb2aa56abbc12ba6a082682450f7470a28d673fef /python
parent19fe566ff178d354cb04e722e15b73b92b359aaf (diff)
downloadfatcat-88edf4cb81a5afd7f469358eaee73affa75c72c2.tar.gz
fatcat-88edf4cb81a5afd7f469358eaee73affa75c72c2.zip
switch '!= None' to 'is not None'
As reminded in code review, thanks Martin.
Diffstat (limited to 'python')
-rwxr-xr-xpython/fatcat_ingest.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/fatcat_ingest.py b/python/fatcat_ingest.py
index d7a221cc..0715da6e 100755
--- a/python/fatcat_ingest.py
+++ b/python/fatcat_ingest.py
@@ -42,7 +42,7 @@ def _run_search_dump(args, search):
print("Will send ingest requests to kafka topic: {}".format(ingest_file_request_topic), file=sys.stderr)
kafka_producer = simple_kafka_producer(args.kafka_hosts)
- if args.limit != None:
+ if args.limit is not None:
search = search[:args.limit]
if args.before_year:
@@ -93,7 +93,7 @@ def _run_search_dump(args, search):
counts['ingest_request'] += 1
if args.dry_run:
continue
- if kafka_producer != None:
+ if kafka_producer is not None:
kafka_producer.produce(
ingest_file_request_topic,
json.dumps(ingest_request).encode('utf-8'),
@@ -103,7 +103,7 @@ def _run_search_dump(args, search):
counts['kafka'] += 1
else:
print(json.dumps(ingest_request))
- if kafka_producer != None:
+ if kafka_producer is not None:
kafka_producer.flush()
print(counts, file=sys.stderr)
if args.dry_run: