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:
Steve Howell
2018-11-17 15:34:00 +00:00
committed by Tim Abbott
parent 7bc23a8f85
commit ff68757358

View File

@@ -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',