Skip to content

Commit

Permalink
optimised geo_filter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DE0CH committed Jun 22, 2020
1 parent 2216f48 commit 11acf2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion geo_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def process_files(path, file_name, geo_filtered_dict):
try:
if tweet['place']['country_code']:
out_file.write(line)
except KeyError or TypeError:
except (KeyError, TypeError):
pass
logging.info('finished ' + os.path.join(path, file_name))
geo_filtered_dict[os.path.join(path, file_name)] = True
Expand Down

0 comments on commit 11acf2f

Please sign in to comment.