From: Marc Fiuczynski Date: Tue, 24 Feb 2009 21:51:23 +0000 (+0000) Subject: 'program' arg belongs with m.output, not m.input. Putting a try: ... except: pass... X-Git-Tag: pyplnet-4.3-0~2 X-Git-Url: http://git.onelab.eu/?p=pyplnet.git;a=commitdiff_plain;h=433060307ffbaefe96d816c780908c05bce89355 'program' arg belongs with m.output, not m.input. Putting a try: ... except: pass around m.input() unfortunately masked the exception that python was likely raising in response to passing an extra arg to m.input. --- diff --git a/plnet.py b/plnet.py index 557103a..2c06d06 100755 --- a/plnet.py +++ b/plnet.py @@ -161,7 +161,7 @@ def InitInterfaces(logger, plc, data, root="", files_only=False, program="NodeMa m = modprobe.Modprobe() try: - m.input("%s/etc/modprobe.conf" % root, program) + m.input("%s/etc/modprobe.conf" % root) except: pass for (dev, inter) in interfaces.iteritems(): @@ -174,7 +174,7 @@ def InitInterfaces(logger, plc, data, root="", files_only=False, program="NodeMa options=" ".join(driver[1:]) if options <> '': m.optionsset(dev,options) - m.output("%s/etc/modprobe.conf" % root) + m.output("%s/etc/modprobe.conf" % root, program) # clean up after any ifcfg-$dev script that's no longer listed as # part of the NodeNetworks associated with this node