Show More
@@ -6,6 +6,7 b' from boards.models import KeyPair, Globa' | |||
|
6 | 6 | from boards.models.attachment.downloaders import download |
|
7 | 7 | from boards.utils import get_file_mimetype, get_file_hash |
|
8 | 8 | from django.db import transaction |
|
9 | from django import forms | |
|
9 | 10 | |
|
10 | 11 | EXCEPTION_NODE = 'Sync node returned an error: {}.' |
|
11 | 12 | EXCEPTION_DOWNLOAD = 'File was not downloaded.' |
@@ -236,7 +237,9 b' class SyncManager:' | |||
|
236 | 237 | tag_ref = tag_refs.find("{}[@ref='{}']".format( |
|
237 | 238 | TAG_ATTACHMENT_REF, attachment.text)) |
|
238 | 239 | url = tag_ref.get(ATTR_URL) |
|
240 | try: | |
|
239 | 241 | attached_file = download(hostname + url) |
|
242 | ||
|
240 | 243 | if attached_file is None: |
|
241 | 244 | raise SyncException(EXCEPTION_DOWNLOAD) |
|
242 | 245 | |
@@ -245,6 +248,9 b' class SyncManager:' | |||
|
245 | 248 | raise SyncException(EXCEPTION_HASH) |
|
246 | 249 | |
|
247 | 250 | files.append(attached_file) |
|
251 | except forms.ValidationError: | |
|
252 | urls.append(hostname+url) | |
|
253 | ||
|
248 | 254 | |
|
249 | 255 | if is_old: |
|
250 | 256 | post = global_id.post |
General Comments 0
You need to be logged in to leave comments.
Login now