Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mat2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Romain
mat2
Commits
2ecf307e
Commit
2ecf307e
authored
5 years ago
by
Julien (jvoisin) Voisin
Browse files
Options
Downloads
Patches
Plain Diff
lol
parent
4d529a1e
Branches
improve_images
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libmat2/exiftool.py
+1
-1
1 addition, 1 deletion
libmat2/exiftool.py
libmat2/web.py
+0
-9
0 additions, 9 deletions
libmat2/web.py
with
1 addition
and
10 deletions
libmat2/exiftool.py
+
1
−
1
View file @
2ecf307e
...
...
@@ -30,7 +30,7 @@ class ExiftoolParser(abstract.AbstractParser):
out
=
subprocess
.
run
([
_get_exiftool_path
(),
'
-json
'
,
self
.
filename
],
check
=
True
,
stdout
=
subprocess
.
PIPE
).
stdout
except
subprocess
.
CalledProcessError
:
except
subprocess
.
CalledProcessError
:
# pragma: no cover
raise
ValueError
meta
=
json
.
loads
(
out
.
decode
(
'
utf-8
'
))[
0
]
for
key
in
self
.
meta_allowlist
:
...
...
This diff is collapsed.
Click to expand it.
libmat2/web.py
+
0
−
9
View file @
2ecf307e
...
...
@@ -96,15 +96,6 @@ class _HTMLParser(parser.HTMLParser):
self
.
tag_required_blocklist
=
required_blocklisted_tags
self
.
tag_blocklist
=
blocklisted_tags
def
error
(
self
,
message
):
"""
Amusingly, Python
'
s documentation doesn
'
t mention that this
function needs to be implemented in subclasses of the parent class
of parser.HTMLParser. This was found by fuzzing,
triggering the following exception:
NotImplementedError: subclasses of ParserBase must override error()
"""
raise
ValueError
(
message
)
def
handle_starttag
(
self
,
tag
:
str
,
attrs
:
List
[
Tuple
[
str
,
Optional
[
str
]]]):
# Ignore the type, because mypy is too stupid to infer
# that get_starttag_text() can't return None.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment