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):
687
687
688
688
def _select_args (req : Plumbing .Request ) -> List [str ]:
689
689
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
+
691
698
if args is None and req .state .select :
692
699
args = [req .state .select ]
693
700
log .debug (f'Using req.state.select: { args } ' )
@@ -702,10 +709,6 @@ def _select_args(req: Plumbing.Request) -> List[str]:
702
709
703
710
log .info (f'selecting using args: { args } ' )
704
711
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
-
709
712
return args
710
713
711
714
You can’t perform that action at this time.
0 commit comments