diff mbox

[ovs-dev,RFC,1/2] doc: Reduce duplication in 'man_pages'

Message ID 7EE4206A5F421D4FBA0A4623185DE2BD0DEE5125@IRSMSX104.ger.corp.intel.com
State Not Applicable
Headers show

Commit Message

Bodireddy, Bhanuprakash May 19, 2017, 9:11 a.m. UTC
The make fails with below error on my fedora 22 Target. 

........................error.log----------------------------------------------
Documentation/conf.py:126:9: F812 list comprehension redefines 'filename' from line 59
Makefile:5848: recipe for target 'flake8-check' failed
make[2]: *** [flake8-check] Error 1
make[2]: Leaving directory '/workspace/master/ovs'
Makefile:5182: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/workspace/master/ovs'
Makefile:3014: recipe for target 'all' failed
make: *** [all] Error 2

I don't see this issue when I replace the filename with 'file_name' as below.  


Regards,
Bhanuprakash. 

>-----Original Message-----
>From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-
>bounces@openvswitch.org] On Behalf Of Ben Pfaff
>Sent: Thursday, May 18, 2017 11:50 PM
>To: Stephen Finucane <stephen@that.guru>
>Cc: dev@openvswitch.org
>Subject: Re: [ovs-dev] [RFC 1/2] doc: Reduce duplication in 'man_pages'
>
>On Wed, May 10, 2017 at 09:32:18PM -0400, Stephen Finucane wrote:
>> All these entries are going to be roughly the same, with only two key
>> differences. Clarify things by focusing on those differences.
>>
>> Signed-off-by: Stephen Finucane <stephen@that.guru>
>
>Fair enough!  Thanks, I applied this to master.
>_______________________________________________
>dev mailing list
>dev@openvswitch.org
>https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Comments

Stephen Finucane May 19, 2017, 9:15 a.m. UTC | #1
On Fri, 2017-05-19 at 09:11 +0000, Bodireddy, Bhanuprakash wrote:
> The make fails with below error on my fedora 22 Target. 
> 
> ........................error.log----------------------------------
> ------------
> Documentation/conf.py:126:9: F812 list comprehension redefines
> 'filename' from line 59
> Makefile:5848: recipe for target 'flake8-check' failed
> make[2]: *** [flake8-check] Error 1
> make[2]: Leaving directory '/workspace/master/ovs'
> Makefile:5182: recipe for target 'all-recursive' failed
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory '/workspace/master/ovs'
> Makefile:3014: recipe for target 'all' failed
> make: *** [all] Error 2
> 
> I don't see this issue when I replace the filename with 'file_name'
> as below.  
> 
> diff --git a/Documentation/conf.py b/Documentation/conf.py
> index d70ee6b..77c4df5 100644
> --- a/Documentation/conf.py
> +++ b/Documentation/conf.py
> @@ -121,6 +121,6 @@ _man_pages = [
> 
>  # Generate list of (path, name, description, [author, ...], section)
>  man_pages = [
> -    ('ref/%s' % filename, filename.split('.', 1)[0],
> -     description, [author], filename.split('.', 1)[1])
> -    for filename, description in _man_pages]
> +    ('ref/%s' % file_name, file_name.split('.', 1)[0],
> +     description, [author], file_name.split('.', 1)[1])
> +    for file_name, description in _man_pages]
> 
> Regards,
> Bhanuprakash. 

Damn - I missed that. Patch submitted to fix this now.

Stephen

> > -----Original Message-----
> > From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-
> > bounces@openvswitch.org] On Behalf Of Ben Pfaff
> > Sent: Thursday, May 18, 2017 11:50 PM
> > To: Stephen Finucane <stephen@that.guru>
> > Cc: dev@openvswitch.org
> > Subject: Re: [ovs-dev] [RFC 1/2] doc: Reduce duplication in
> > 'man_pages'
> > 
> > On Wed, May 10, 2017 at 09:32:18PM -0400, Stephen Finucane wrote:
> > > All these entries are going to be roughly the same, with only two
> > > key
> > > differences. Clarify things by focusing on those differences.
> > > 
> > > Signed-off-by: Stephen Finucane <stephen@that.guru>
> > 
> > Fair enough!  Thanks, I applied this to master.
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff mbox

Patch

diff --git a/Documentation/conf.py b/Documentation/conf.py
index d70ee6b..77c4df5 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -121,6 +121,6 @@  _man_pages = [

 # Generate list of (path, name, description, [author, ...], section)
 man_pages = [
-    ('ref/%s' % filename, filename.split('.', 1)[0],
-     description, [author], filename.split('.', 1)[1])
-    for filename, description in _man_pages]
+    ('ref/%s' % file_name, file_name.split('.', 1)[0],
+     description, [author], file_name.split('.', 1)[1])
+    for file_name, description in _man_pages]