Skip to content

Commit c1e5c71

Browse files
committed
Process multiple input arguments correctly
This can be a list or tuple or a string. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent 0612cb1 commit c1e5c71

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/scancode/cli.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,8 +522,11 @@ def run_scan(
522522

523523
if not echo_func:
524524
def echo_func(*args, **kwargs): pass
525-
if not isinstance(input, list):
526-
pass
525+
526+
if not isinstance(input, (list, tuple)):
527+
# nothing else todo
528+
assert isinstance(input, (bytes, unicode))
529+
527530
elif len(input) == 1:
528531
# we received a single input path, so we treat this as a single path
529532
input = input[0] # NOQA

0 commit comments

Comments
 (0)