On Mon, Nov 12, 2018 at 11:20 PM Anssi Saari wrote:
>
> Chris Angelico writes:
>
> > On Fri, Nov 9, 2018 at 11:11 PM Anssi Saari wrote:
> >>
> >> Chris Angelico writes:
> >>
> >> > No helper needed. Safe against command injection. Uses the known
> >> > format of the command's output; if you
Chris Angelico writes:
> On Fri, Nov 9, 2018 at 11:11 PM Anssi Saari wrote:
>>
>> Chris Angelico writes:
>>
>> > No helper needed. Safe against command injection. Uses the known
>> > format of the command's output; if you want other information as well
>> > as the type, you could get that too.
srinivasan wrote:
> Even after changing as per the below
> "blkid -o export %s | grep 'TYPE' | cut -d'=' -f3"
> or:
> 'blkid -o export %s | grep "TYPE" | cut -d"=" -f3'
> or:
> "blkid -o export %s | grep \"TYPE\" | cut -d\"=\" -f3"
>
> Still my output is:
> */dev/mmcblk1p1: LABEL="efi"
On Fri, Nov 9, 2018 at 11:11 PM Anssi Saari wrote:
>
> Chris Angelico writes:
>
> > No helper needed. Safe against command injection. Uses the known
> > format of the command's output; if you want other information as well
> > as the type, you could get that too.
>
> Can someone let me in on
Chris Angelico writes:
> No helper needed. Safe against command injection. Uses the known
> format of the command's output; if you want other information as well
> as the type, you could get that too.
Can someone let me in on this secret helper module? Doesn't seem to
match the helper module in
Many Thanks a lot , I can use for reliably "lsblk %s -n -o FSTYPE" in the
reused code of mine as below
cmd = "lsblk %s -n -o FSTYPE" % partition_path
return self._helper.execute_cmd_output_string(cmd)
I really appreciate for all your support w.r.t this..
I feel I have kick
srinivasan writes:
> Even after changing as per the below
> "blkid -o export %s | grep 'TYPE' | cut -d'=' -f3"
> or:
> 'blkid -o export %s | grep "TYPE" | cut -d"=" -f3'
> or:
> "blkid -o export %s | grep \"TYPE\" | cut -d\"=\" -f3"
>
> Still my output is:
> */dev/mmcblk1p1: LABEL="efi"
On Wed, Nov 7, 2018 at 11:42 PM srinivasan wrote:
>
> Some I managed to fix temporarily as below, might be useful for others. Also
> please correct me if anything wrong or for any improvements in the below
>
> cmd = "blkid -o export %s" % partition_path
> out =
Some I managed to fix temporarily as below, might be useful for others.
Also please correct me if anything wrong or for any improvements in the
below
cmd = "blkid -o export %s" % partition_path
out = self._helper.execute_cmd_output_string(cmd)
var = out.split("TYPE=",
On Wed, Nov 7, 2018 at 11:36 PM Qian Cai wrote:
>
> srinivasan wrote:
> > Even after changing as per the below
> > "blkid -o export %s | grep 'TYPE' | cut -d'=' -f3"
> > or:
> > 'blkid -o export %s | grep "TYPE" | cut -d"=" -f3'
> > or:
> > "blkid -o export %s | grep \"TYPE\" | cut -d\"=\" -f3"
srinivasan wrote:
> Even after changing as per the below
> "blkid -o export %s | grep 'TYPE' | cut -d'=' -f3"
> or:
> 'blkid -o export %s | grep "TYPE" | cut -d"=" -f3'
> or:
> "blkid -o export %s | grep \"TYPE\" | cut -d\"=\" -f3"
>
> Still my output is:
> */dev/mmcblk1p1: LABEL="efi"
Even after changing as per the below
"blkid -o export %s | grep 'TYPE' | cut -d'=' -f3"
or:
'blkid -o export %s | grep "TYPE" | cut -d"=" -f3'
or:
"blkid -o export %s | grep \"TYPE\" | cut -d\"=\" -f3"
Still my output is:
*/dev/mmcblk1p1: LABEL="efi" UUID="1084-AA42" TYPE="vfat"*
My expected
On Wed, 2018-11-07 at 10:22 +0100, srinivasan wrote:
> blkid -o export %s | grep \'TYPE\' | cut -d\"=\" -f3
You don't need to escape the single quotes.
Try either:
"blkid -o export %s | grep 'TYPE' | cut -d'=' -f3"
or:
'blkid -o export %s | grep "TYPE" | cut -d"=" -f3'
or:
"blkid -o export %s |
quot;
>
> Other issues may also be there.
> -Original Message-
> From: Tutor On Behalf Of
> Alan Gauld via Tutor
> Sent: Tuesday, November 6, 2018 7:37 PM
> To: tu...@python.org
> Cc: python-...@python.org
> Subject: Re: [Tutor] SyntaxError: can't assign to literal wh
14 matches
Mail list logo