Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
binwalk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-gitdep
binwalk
Commits
0fa1115a
Commit
0fa1115a
authored
Dec 29, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed type checking in magic.py
parent
fad71194
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
magic.py
src/binwalk/core/magic.py
+2
-2
No files found.
src/binwalk/core/magic.py
View file @
0fa1115a
...
...
@@ -586,7 +586,7 @@ class Magic(object):
if
line
.
operator
:
try
:
# If the operator value of this signature line is just an integer value, use it
if
isinstance
(
line
.
opvalue
,
int
):
if
isinstance
(
line
.
opvalue
,
int
)
or
isinstance
(
line
.
opvalue
,
long
)
:
opval
=
line
.
opvalue
# Else, evaluate the complex expression
else
:
...
...
@@ -612,7 +612,7 @@ class Magic(object):
except
KeyboardInterrupt
as
e
:
raise
e
except
Exception
as
e
:
raise
ParserException
(
"
Failed to apply operator "
+
line
.
operator
+
" to "
+
str
(
dvalue
)
+
"
: "
+
str
(
e
))
raise
ParserException
(
"
Operation '"
+
str
(
dvalue
)
+
" "
+
str
(
line
.
operator
)
+
"= "
+
str
(
line
.
opvalue
)
+
"' failed
: "
+
str
(
e
))
# Does the data (dvalue) match the specified comparison?
if
((
line
.
value
is
None
)
or
...
...
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