diff mbox series

[1/2] wic: engine.py: use raw string for escape sequence

Message ID 20240604080621.1885249-1-ejo@pengutronix.de
State Accepted, archived
Commit e33d7241f6c2897e930aff41e18b154891197ab9
Headers show
Series [1/2] wic: engine.py: use raw string for escape sequence | expand

Commit Message

Enrico Jörns June 4, 2024, 8:06 a.m. UTC
Fixes:

| poky/scripts/lib/wic/engine.py:362: SyntaxWarning: invalid escape sequence '\/'

Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
---
 scripts/lib/wic/engine.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sandeep Gundlupet Raju July 8, 2024, 5:56 p.m. UTC | #1
Hi RP,

We do see this issue in scarthgap, Can you get this patch backported to 
scarthgap branch?

Thanks,

Sandeep

On 6/4/2024 2:06 AM, Enrico Jörns via lists.openembedded.org wrote:
> Fixes:
>
> | poky/scripts/lib/wic/engine.py:362: SyntaxWarning: invalid escape sequence '\/'
>
> Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
> ---
>   scripts/lib/wic/engine.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
> index 674ccfc244..ce7e6c5d75 100644
> --- a/scripts/lib/wic/engine.py
> +++ b/scripts/lib/wic/engine.py
> @@ -359,7 +359,7 @@ class Disk:
>           Remove files/dirs and their contents from the partition.
>           This only applies to ext* partition.
>           """
> -        abs_path = re.sub('\/\/+', '/', path)
> +        abs_path = re.sub(r'\/\/+', '/', path)
>           cmd = "{} {} -wR 'rm \"{}\"'".format(self.debugfs,
>                                               self._get_part_image(pnum),
>                                               abs_path)
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#200302): https://lists.openembedded.org/g/openembedded-core/message/200302
> Mute This Topic: https://lists.openembedded.org/mt/106478736/3619217
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [sandeep.gundlupet-raju@amd.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Richard Purdie July 8, 2024, 9:32 p.m. UTC | #2
On Mon, 2024-07-08 at 11:56 -0600, Gundlupet Raju, Sandeep wrote:
> Hi RP,
> 
> We do see this issue in scarthgap, Can you get this patch backported
> to 
> scarthgap branch?
> 
> Thanks,
> 
> Sandeep
> 
> On 6/4/2024 2:06 AM, Enrico Jörns via lists.openembedded.org wrote:
> > Fixes:
> > 
> > > poky/scripts/lib/wic/engine.py:362: SyntaxWarning: invalid escape
> > > sequence '\/'
> > 
> > Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
> > ---


You need to talk to the stable maintainer for scarthgap, Steve Sakoman
(copied on this reply) about that rather than me.

Cheers,

Richard
Steve Sakoman July 9, 2024, 1:12 p.m. UTC | #3
On Mon, Jul 8, 2024 at 2:32 PM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Mon, 2024-07-08 at 11:56 -0600, Gundlupet Raju, Sandeep wrote:
> > Hi RP,
> >
> > We do see this issue in scarthgap, Can you get this patch backported
> > to
> > scarthgap branch?
> >
> > Thanks,
> >
> > Sandeep
> >
> > On 6/4/2024 2:06 AM, Enrico Jörns via lists.openembedded.org wrote:
> > > Fixes:
> > >
> > > > poky/scripts/lib/wic/engine.py:362: SyntaxWarning: invalid escape
> > > > sequence '\/'
> > >
> > > Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
> > > ---
>
>
> You need to talk to the stable maintainer for scarthgap, Steve Sakoman
> (copied on this reply) about that rather than me.

I've got it, thanks!

Steve
Sandeep Gundlupet Raju July 9, 2024, 3:21 p.m. UTC | #4
On 7/9/2024 7:12 AM, Steve Sakoman wrote:
> On Mon, Jul 8, 2024 at 2:32 PM Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
>> On Mon, 2024-07-08 at 11:56 -0600, Gundlupet Raju, Sandeep wrote:
>>> Hi RP,
>>>
>>> We do see this issue in scarthgap, Can you get this patch backported
>>> to
>>> scarthgap branch?
>>>
>>> Thanks,
>>>
>>> Sandeep
>>>
>>> On 6/4/2024 2:06 AM, Enrico Jörns via lists.openembedded.org wrote:
>>>> Fixes:
>>>>
>>>>> poky/scripts/lib/wic/engine.py:362: SyntaxWarning: invalid escape
>>>>> sequence '\/'
>>>> Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
>>>> ---
>>
>> You need to talk to the stable maintainer for scarthgap, Steve Sakoman
>> (copied on this reply) about that rather than me.
> I've got it, thanks!
Thanks RP and Steve. Steve when this will be available in scarthgap branch?
>
> Steve
Steve Sakoman July 9, 2024, 3:41 p.m. UTC | #5
On Tue, Jul 9, 2024 at 8:22 AM Gundlupet Raju, Sandeep
<sandeep.gundlupet-raju@amd.com> wrote:
>
>
> On 7/9/2024 7:12 AM, Steve Sakoman wrote:
> > On Mon, Jul 8, 2024 at 2:32 PM Richard Purdie
> > <richard.purdie@linuxfoundation.org> wrote:
> >> On Mon, 2024-07-08 at 11:56 -0600, Gundlupet Raju, Sandeep wrote:
> >>> Hi RP,
> >>>
> >>> We do see this issue in scarthgap, Can you get this patch backported
> >>> to
> >>> scarthgap branch?
> >>>
> >>> Thanks,
> >>>
> >>> Sandeep
> >>>
> >>> On 6/4/2024 2:06 AM, Enrico Jörns via lists.openembedded.org wrote:
> >>>> Fixes:
> >>>>
> >>>>> poky/scripts/lib/wic/engine.py:362: SyntaxWarning: invalid escape
> >>>>> sequence '\/'
> >>>> Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
> >>>> ---
> >>
> >> You need to talk to the stable maintainer for scarthgap, Steve Sakoman
> >> (copied on this reply) about that rather than me.
> > I've got it, thanks!
> Thanks RP and Steve. Steve when this will be available in scarthgap branch?

It is in my current test queue (stable/scarthgap-nut), if it passes
autobuilder testing then it will be posted to the list along with the
other patches for review.  If no comments during the two business day
review period then they will be merged to scarthgap.

Steve
diff mbox series

Patch

diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 674ccfc244..ce7e6c5d75 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -359,7 +359,7 @@  class Disk:
         Remove files/dirs and their contents from the partition.
         This only applies to ext* partition.
         """
-        abs_path = re.sub('\/\/+', '/', path)
+        abs_path = re.sub(r'\/\/+', '/', path)
         cmd = "{} {} -wR 'rm \"{}\"'".format(self.debugfs,
                                             self._get_part_image(pnum),
                                             abs_path)