mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Handling another unicode decode issue in uploaded OPMLs.
This commit is contained in:
parent
c6e9836656
commit
2a5ffb48c5
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ import pickle
|
|||
import base64
|
||||
from utils import log as logging
|
||||
from oauth2client.client import OAuth2WebServerFlow, FlowExchangeError
|
||||
from bson.errors import InvalidStringData
|
||||
import uuid
|
||||
from django.contrib.sites.models import Site
|
||||
# from django.db import IntegrityError
|
||||
|
@ -36,7 +37,7 @@ def opml_upload(request):
|
|||
xml_opml = file.read()
|
||||
try:
|
||||
uploaded_opml = UploadedOPML.objects.create(user_id=request.user.pk, opml_file=xml_opml)
|
||||
except UnicodeDecodeError:
|
||||
except (UnicodeDecodeError, InvalidStringData):
|
||||
uploaded_opml = None
|
||||
folders = None
|
||||
code = -1
|
||||
|
|
Loading…
Add table
Reference in a new issue