Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gajim-plugins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
56
Issues
56
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
gajim-plugins
Commits
c134ae5b
Commit
c134ae5b
authored
Apr 21, 2018
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[preview] Fix error when mime or size is not set
parent
ab38ee7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
url_image_preview/url_image_preview.py
url_image_preview/url_image_preview.py
+3
-3
No files found.
url_image_preview/url_image_preview.py
View file @
c134ae5b
...
...
@@ -476,9 +476,9 @@ class Base(object):
key
,
iv
,
encrypted
):
file_mime
,
file_size
=
tuple_arg
# Check if mime type is acceptable
if
(
file_mime
==
''
and
file_size
==
0
)
or
file_mime
is
Non
e
:
log
.
info
(
"Failed to load HEAD Request for URL: '%s'"
"
(see debug log for more info)"
,
url
)
if
not
file_mime
or
not
file_siz
e
:
log
.
info
(
"Failed to load HEAD Request for URL: '%s'
"
"
mime: %s, size: %s"
,
url
,
file_mime
,
file_size
)
# URL is already displayed
return
if
file_mime
.
lower
()
not
in
ACCEPTED_MIME_TYPES
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment