[PATCH rtems-net-legacy v3] netlegacy: Use os.path instead of hardcoded Unix like path

Gedare Bloom gedare at rtems.org
Thu Apr 15 17:36:17 UTC 2021


On Thu, Apr 15, 2021 at 10:49 AM Vijay Kumar Banerjee <vijay at rtems.org> wrote:
>
>
>
> On Wed, Apr 14, 2021 at 10:22 PM Vijay Kumar Banerjee <vijay at rtems.org> wrote:
> >
> > On Wed, Apr 14, 2021 at 8:40 PM Chris Johns <chrisj at rtems.org> wrote:
> > >
> > > On 15/4/21 5:22 am, Vijay Kumar Banerjee wrote:
> > > > On Wed, Apr 14, 2021 at 1:10 PM Gedare Bloom <gedare at rtems.org> wrote:
> > > >>
> > > >> On Wed, Apr 14, 2021 at 12:36 PM Vijay Kumar Banerjee <vijay at rtems.org> wrote:
> > > >>>
> > > >>> ---
> > > >>>  netlegacy.py | 27 +++++++++++++--------------
> > > >>>  1 file changed, 13 insertions(+), 14 deletions(-)
> > > >>>
> > > >>> diff --git a/netlegacy.py b/netlegacy.py
> > > >>> index 05cb78a..2936b8f 100644
> > > >>> --- a/netlegacy.py
> > > >>> +++ b/netlegacy.py
> > > >>> @@ -37,7 +37,7 @@ exclude_headers = ['rtems-bsd-user-space.h', 'rtems-bsd-kernel-space.h']
> > > >>>
> > > >>>  for root, dirs, files in os.walk("."):
> > > >>>      [dirs.remove(d) for d in list(dirs) if d in exclude_dirs]
> > > >>> -    dirs.append('./bsps/shared/net')
> > > >>> +    dirs.append(os.path.join('bsps', 'shared', 'net'))
> > > >>>      include_files[root[2:]] = []
> > > >>>      for name in files:
> > > >>>          ext = os.path.splitext(name)[1]
> > > >>> @@ -59,10 +59,9 @@ def build(bld):
> > > >>>      include_path = []
> > > >>>      ip = ''
> > > >>>      bsp = bld.env.RTEMS_ARCH_BSP.split('-')[-1]
> > > >>> -    pppd_source = [os.path.join('./pppd', s)
> > > >>> -                   for s in os.listdir('./pppd') if s[-2:] == '.c']
> > > >>> -    telnetd_source = [os.path.join('./telnetd', s)
> > > >>> -                      for s in os.listdir('telnetd') if s[-2:] == '.c']
> > > >>> +    pppd_source = [os.path.join('pppd', s)
> > > >>> +                   for s in os.listdir('pppd')
> > > >>> +                   if os.path.splitext(s)[1] == '.c']
> > > >> This indentation looks wrong?
> > > >>
> > > > This looks good with git show. I'm not sure what happened here, maybe
> > > > it looks weird due to email formatting?
> > >
> > > Embedded tab character?
> > I'm not sure what's the issue here. Generally, git show output shows
> > any irregularity. This indentation looks right when I open it on mutt.
> > This is probably some issue with the email formatting. I see that some
> > of the removed codes in this patch also have crooked indentation but
> > they look properly indented upstream.
> >
> Hi,
>
> Just wanted to add that I pushed the commit in my private repository and the indentation looks alright. Please have a look:
> https://git.rtems.org/vijay/rtems-net-legacy.git/commit/?id=c61fb1cf8517cb5d42568b48721056cf15a3bb40
>

I realized that I was making a big fuss about nothing. I thought this
was a for loop, I didn't work out that it's a line-broken list
comprehension.

I'm starting to think line length limits might not be a great thing in
Python code, hah!

It looks good, thanks.

> Best regards,
> Vijay
> > >
> > > Chris


More information about the devel mailing list