mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
hipchat: Just skip over missing attachments.
It seems like we get a lot of exports with bad attachment data, and some folks don't necessarily care, so we just skip for now.
This commit is contained in:
@@ -33,6 +33,12 @@ class AttachmentHandler:
|
||||
|
||||
local_fn = os.path.join(files_dir, path)
|
||||
|
||||
if not os.path.exists(local_fn):
|
||||
# HipChat has an option to not include these in its
|
||||
# exports, since file uploads can be very large.
|
||||
logging.info('Skipping attachment with no file data: ' + local_fn)
|
||||
return None
|
||||
|
||||
target_path = os.path.join(
|
||||
str(realm_id),
|
||||
'HipChatImportAttachment',
|
||||
|
||||
Reference in New Issue
Block a user