diff --git a/geo_filter.py b/geo_filter.py index 3e2cd15..176900b 100644 --- a/geo_filter.py +++ b/geo_filter.py @@ -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