[elbe-devel] [PATCH v2 46/66] repomanager: Fix Pylint
Olivier Dion
dion at linutronix.de
Wed Jun 10 16:40:44 CEST 2020
On Wed, 10 Jun 2020, Torben Hohn <torben.hohn at linutronix.de> wrote:
>>
>> - cmd = ('reprepro --keepunreferencedfiles --export=never '
>> - '--basedir "%s" -C %s includedeb %s %s')
>> - do(cmd % (self.fs.path, component, codename, path))
>> + cmd = 'reprepro %s includedeb %s %s'
>> + global_opt = ["--keepunreferencedfiles",
>> + "--export=never",
>> + '--basedir "%s"' % self.fs.path]
>> +
>> + if components is not None:
>> + global_opt.append("--component %s" % components)
>
> i dont see "" around %s. If components contains | then the shell would
> interpret this as a pipe symbol.
Indeed it needs to be quoted.
>
> i would also prefer components to be a list.
> And use '|'.join(components) then.
I wanted that too. But this requires changes to all callers. Or to do
something like:
----------------------------------------------------------------------
if components is not None:
if not isinstance(components, list):
components = [components]
...
----------------------------------------------------------------------
I don't mind either.
--
Olivier Dion
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
More information about the elbe-devel
mailing list