File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -687,7 +687,14 @@ def load(req: Plumbing.Request, *opts):
687687
688688def _select_args (req : Plumbing .Request ) -> List [str ]:
689689 log .debug (f'Select args: { req .args } , state: { req .state } ' )
690- args = req .args
690+ args : List [str ] = []
691+
692+ if req .args :
693+ for this in req .args :
694+ if not isinstance (this , str ):
695+ raise ValueError (f'Selection not possible with arg that is not a string: { this } ' )
696+ args += [this ]
697+
691698 if args is None and req .state .select :
692699 args = [req .state .select ]
693700 log .debug (f'Using req.state.select: { args } ' )
@@ -702,10 +709,6 @@ def _select_args(req: Plumbing.Request) -> List[str]:
702709
703710 log .info (f'selecting using args: { args } ' )
704711
705- for this in args :
706- if not isinstance (this , str ):
707- raise ValueError (f'Selection resulted in something that is not a string: { this } ' )
708-
709712 return args
710713
711714
You can’t perform that action at this time.
0 commit comments