[ovs-git] Open vSwitch: ovs.daemon: Fix bug introduced by "pychecker" warning fixes. (master)

dev at openvswitch.org dev at openvswitch.org
Thu Sep 29 14:29:01 UTC 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  e44a6fe503ad639787ec2f8d1ee0710e63dacd81 (commit)
       via  723a8d23f5d9ba07d67bf4d312b00f001db5bdb4 (commit)
      from  2c11e6d91216a1f40e9a499ee37868c81fc34f35 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e44a6fe503ad639787ec2f8d1ee0710e63dacd81
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=e44a6fe503ad639787ec2f8d1ee0710e63dacd81
Author: Ben Pfaff <blp at nicira.com>
		
ovs.daemon: Fix bug introduced by "pychecker" warning fixes.
		
Commit 591c20651f1 "daemon.py: Don't shadow built-in 'file' variable"
changed most instances of "file" to "file_handle" but missed this one.

I'm not certain that this solves a real problem, but it still seems wrong.

Bug #7533.


commit 723a8d23f5d9ba07d67bf4d312b00f001db5bdb4
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=723a8d23f5d9ba07d67bf4d312b00f001db5bdb4
Author: Ben Pfaff <blp at nicira.com>
		
ovs.daemon: Fix semantics of --pidfile option.
		
The --pidfile option is supposed to work like this:

   * Without --pidfile, you don't get a pidfile.
   * With --pidfile, you get the default pidfile.
   * With --pidfile=FILE, you get FILE as your pidfile.

However, it actually worked like this:

   * Without --pidfile, you got the default pidfile.
   * With --pidfile, you got no pidfile at all.
   * With --pidfile=FILE, you got FILE as your pidfile.

This is because of the semantics of "default" in argparse.  It is
documented as:

    The default keyword argument of add_argument(), whose value defaults to
    None, specifies what value should be used if the command-line argument
    is not present.  For optional arguments, the default value is used when
    the option string was not present at the command line.

We actually want "const", which is documented under the description of
nargs="?" as:

    If no command-line argument is present, the value from default will be
    produced.  Note that for optional arguments, there is an additional
    case - the option string is present but not followed by a command-line
    argument.  In this case the value from const will be produced.

Bug #7533.


-----------------------------------------------------------------------

Summary of changes:
 python/ovs/daemon.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list