From 844d1ffdb9770df6317e8bdabacdec99b545edbe Mon Sep 17 00:00:00 2001
From: devttys0 <heffnercj@gmail.com>
Date: Mon, 21 Apr 2014 21:58:10 -0400
Subject: [PATCH] Fixed bug which prevented multiple API arguments from being passed as kwargs

---
 src/binwalk/core/module.py | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/binwalk/core/module.py b/src/binwalk/core/module.py
index 1d7fc0e..7182cf0 100644
--- a/src/binwalk/core/module.py
+++ b/src/binwalk/core/module.py
@@ -536,11 +536,16 @@ class Modules(object):
     def _set_arguments(self, argv=[], kargv={}):
         for (k,v) in iterator(kargv):
             k = self._parse_api_opt(k)
-            argv.append(k)
             if v not in [True, False, None]:
-                if not isinstance(v, str):
-                    v = str(bytes2str(v))
-                argv.append(v)
+                if not isinstance(v, list):
+                    v = [v]
+                for value in v:
+                    if not isinstance(value, str):
+                        value = str(bytes2str(value))
+                    argv.append(k)
+                    argv.append(value)
+            else:
+                argv.append(k)
 
         if not argv and not self.arguments:
             self.arguments = sys.argv[1:]
--
libgit2 0.26.0