Looks good. Ethan
On Wed, Sep 21, 2011 at 14:57, Ben Pfaff <[email protected]> wrote: > pychecker imports the code that it checks, which means that code at top > level runs, so "ovs-xapi-sync" failed to import unless the user had write > access to /var/log/openvswitch. > --- > .../usr_share_openvswitch_scripts_ovs-xapi-sync | 16 ++++++++-------- > 1 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync > b/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync > index 0263556..57dc2e3 100755 > --- a/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync > +++ b/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync > @@ -38,14 +38,7 @@ import ovs.util > import ovs.daemon > import ovs.db.idl > > -s_log = logging.getLogger("ovs-xapi-sync") > -l_handler = logging.handlers.RotatingFileHandler( > - "/var/log/openvswitch/ovs-xapi-sync.log") > -l_formatter = logging.Formatter('%(filename)s: %(levelname)s: %(message)s') > -l_handler.setFormatter(l_formatter) > -s_log.addHandler(l_handler) > -s_log.setLevel(logging.INFO) > - > +s_log = logging.getLogger("ovs-xapi-sync") > vsctl="/usr/bin/ovs-vsctl" > session = None > force_run = False > @@ -263,6 +256,13 @@ def update_tap_from_vif(idl, tap_name, vif_name): > def main(argv): > global force_run > > + l_handler = logging.handlers.RotatingFileHandler( > + "/var/log/openvswitch/ovs-xapi-sync.log") > + l_formatter = logging.Formatter('%(filename)s: %(levelname)s: > %(message)s') > + l_handler.setFormatter(l_formatter) > + s_log.addHandler(l_handler) > + s_log.setLevel(logging.INFO) > + > try: > options, args = getopt.gnu_getopt( > argv[1:], 'h', ['help'] + ovs.daemon.LONG_OPTIONS) > -- > 1.7.4.4 > > _______________________________________________ > dev mailing list > [email protected] > http://openvswitch.org/mailman/listinfo/dev > _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
