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.2-3~2 X-Git-Url: http://git.onelab.eu/?p=pyplnet.git;a=commitdiff_plain;h=2541b1dbd2176b22da703b946cdcfba13d350e21 '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 a9a868f..d3436d9 100755 --- a/plnet.py +++ b/plnet.py @@ -141,7 +141,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(): @@ -154,7 +154,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