From 72c5bf0149fbbe936e962ec150aeba02e43ac207 Mon Sep 17 00:00:00 2001
From: Logan Rodie <gryphontooth@gmail.com>
Date: Tue, 29 Jan 2019 09:39:08 -0500
Subject: [PATCH] Fixed issue with next_target_file being unicode and causing an exception

---
 src/binwalk/core/module.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/binwalk/core/module.py b/src/binwalk/core/module.py
index 6ff178b..418835d 100644
--- a/src/binwalk/core/module.py
+++ b/src/binwalk/core/module.py
@@ -415,7 +415,7 @@ class Module(object):
 
             # Values in self.target_file_list are either already open files (BlockFile instances), or paths
             # to files that need to be opened for scanning.
-            if isinstance(next_target_file, str):
+            if isinstance(next_target_file, str) or isinstance(next_target_file, unicode):
                 fp = self.config.open_file(next_target_file)
             else:
                 fp = next_target_file
--
libgit2 0.26.0