summaryrefslogtreecommitdiff
path: root/python/binaryview.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2020-09-29 19:07:55 -0400
committerPeter LaFosse <peter@vector35.com>2020-10-08 11:08:08 -0400
commit4fe229294f7b5b123a6dae58e0e4ce675531f7b8 (patch)
tree7944f9efc89dd948c3e584cee96d776bbde24828 /python/binaryview.py
parent8b7f8358a16609779fb31af4b08bbea85ee46648 (diff)
stringify filename passed into get_view_of_type (py2/3 compatible fix for using py3 Path object)
Diffstat (limited to 'python/binaryview.py')
-rw-r--r--python/binaryview.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 38a40c7d..503bd68e 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -764,6 +764,9 @@ class BinaryViewType(with_metaclass(_BinaryViewTypeMetaclass, object)):
:rtype: :py:class:`BinaryView` or ``None``
"""
sqlite = b"SQLite format 3"
+ if not isinstance(filename, str):
+ filename = str(filename)
+
isDatabase = filename.endswith(".bndb")
if isDatabase:
f = open(filename, 'rb')