I'm not a Python expert but in general I favor code that is easy to read
and understand and usually adding lots of parameters detracts from that.

On Thu, Jul 21, 2016 at 04:44:11PM +0000, Alin Serdean wrote:
> @Guru, @Ben what do you suggest?
> 
> > -----Mesaj original-----
> > De la: Paul Boca
> > Trimis: Thursday, July 21, 2016 7:36 PM
> > Către: Alin Serdean <aserd...@cloudbasesolutions.com>;
> > dev@openvswitch.org
> > Subiect: RE: [ovs-dev] [PATCH V7 12/16] python tests: Ported Python
> > daemon to Windows
> > 
> > Hi Alin!
> > 
> > Sure, I will removed DuplicateHandle  from daemon, this was a code left
> > behind by me after I tried something with os.pipe().
> > 
> > If I'm splitting daemon.py in 3 files (daemon.py to contain only wrappers 
> > over
> > Linux/Windows specific functions) then all the globals used in ported
> > functions will need to be added as parameters (this is one example that I 
> > see
> > for now).
> > The change would not be big, but in my opinion is more easier to follow the
> > daemon functionality if all the functions are in one file.
> [Alin Gabriel Serdean: ] This is a personal preference because I think it 
> would look cleaner let's wait for others to share their opinion.
> > 
> > Thanks,
> > Paul
> > 
> > > -----Original Message-----
> > > From: Alin Serdean
> > > Sent: Thursday, July 21, 2016 4:02 PM
> > > To: Paul Boca; dev@openvswitch.org
> > > Subject: RE: [ovs-dev] [PATCH V7 12/16] python tests: Ported Python
> > > daemon to Windows
> > >
> > > I still think a new file would be more suited it :), but maybe that's 
> > > just me.
> > >
> > > As discussed offline I think you can remove the DuplicateHandle part.
> > >
> > > Thanks,
> > > Alin.
> > >
> > > > -----Mesaj original-----
> > > > De la: dev [mailto:dev-boun...@openvswitch.org] În numele Paul Boca
> > > > Trimis: Friday, July 15, 2016 5:21 PM
> > > > Către: dev@openvswitch.org
> > > > Subiect: [ovs-dev] [PATCH V7 12/16] python tests: Ported Python
> > > > daemon
> > > to
> > > > Windows
> > > >
> > > > Used subprocess.Popen instead os.fork (not implemented on windows)
> > > and
> > > > repaced of os.pipe with Windows pipes.
> > > >
> > > > To be able to identify the child process I added an extra parameter
> > > > to daemon process '--pipe-handle', this parameter also contains the
> > > > parent Windows pipe handle, used by the child to signal the start.
> > > >
> > > > The PID file is created directly on Windows, without using a
> > > > temporary file because the symbolic link doesn't inheriths the file
> > > > lock set on temporary
> > > file.
> > > >
> > > > Signed-off-by: Paul-Daniel Boca <pb...@cloudbasesolutions.com>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to