Skip to content

Commit 2ec4f63

Browse files
committed
Improve handling of options in tests
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent aa061c2 commit 2ec4f63

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/scancode/cli_test_utils.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,8 @@ def run_scan_click(
137137

138138

139139
def get_opts(options):
140-
try:
141-
return ' '.join(options)
142-
except:
143-
try:
144-
return b' '.join(options)
145-
except:
146-
return b' '.join(map(repr, options))
140+
opts = [o if isinstance(o, str) else repr(o) for o in options]
141+
return ' '.join(opts)
147142

148143

149144
WINDOWS_CI_TIMEOUT = '222.2'

0 commit comments

Comments
 (0)