[ovs-dev] [PATCH 7/9] tests: Convert dot2pic build tool from Perl to Python.

Ben Pfaff blp at ovn.org
Mon Nov 20 18:05:47 UTC 2017


On Thu, Nov 16, 2017 at 09:32:18AM -0500, Aaron Conole wrote:
> Ben Pfaff <blp at ovn.org> writes:
> 
> > Perl is unfashionable and Python is more widely available and understood,
> > so this commit converts one of the OVS uses of Perl into Python.
> >
> > Signed-off-by: Ben Pfaff <blp at ovn.org>
> > +                    label = label[1:-1]
> > +            else:
> > +                label = None
> > +            
> 
> I get a `git am` complaint from this line.

Thanks, fixed.

> > +            dst.write("linethick = %f;\n"
> > +                      % (0.5 if style == 'dotted' else 1.0))
> > +            dst.write("spline -> from %f,%f" % xy[0])
> > +            for x, y in xy:
> > +                dst.write(" to %f,%f" % (x, y))
> > +            dst.write('\n')
> >  
> > -        print "\"$label\" at $xl,$yl\n" if defined($label);
> > -    }
> > +            if label:
> > +                dst.write('"%s" at %f,%f\n' % (label, xl, yl))
> > +        elif command == 'stop':
> > +            break
> > +        else:
> > +            sys.stderr.write("%s\n" % command)
> > +            assert False    
> 
> And this one (incidentally, I think I might submit a checkpatch patch to
> re-enable python file checks).

Also fixed, thanks again.


More information about the dev mailing list