summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-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')