chg: [pystemon importer] fix gzipped pastes

pull/604/head
Terrtia 2023-06-22 16:34:14 +02:00
parent 47e1343187
commit f1f33d6c1b
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 7 additions and 2 deletions

View File

@ -47,7 +47,12 @@ class PystemonImporter(AbstractImporter):
if not content: if not content:
return None return None
return self.create_message(item_id, content, source='pystemon') if full_item_path[-3:] == '.gz':
gzipped = True
else:
gzipped = False
return self.create_message(item_id, content, gzipped=gzipped, source='pystemon')
except IOError as e: except IOError as e:
print(f'Error: {full_item_path}, IOError') print(f'Error: {full_item_path}, IOError')