Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

slack: Filter out non-.json files for processing.

Matt Kellerfd996c286efa
diff --git a/zerver/data_import/slack.py b/zerver/data_import/slack.py
index e13934fed70..40c0e856f2c 100755
--- a/zerver/data_import/slack.py
+++ b/zerver/data_import/slack.py
@@ -794,7 +794,8 @@ def get_messages_iterator(
dir_path = os.path.join(slack_data_dir, dir_name)
json_names = os.listdir(dir_path)
for json_name in json_names:
- all_json_names[json_name].append(dir_path)
+ if json_name.endswith(".json"):
+ all_json_names[json_name].append(dir_path)
# Sort json_name by date
for json_name in sorted(all_json_names.keys()):