From 8abc3472e328f337c99766b9c62af461fb1de347 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Tue, 16 Mar 2010 14:59:09 -0700 Subject: [PATCH] Pass code check. --- mininet/moduledeps.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mininet/moduledeps.py b/mininet/moduledeps.py index 7cfe8e8..b21c629 100644 --- a/mininet/moduledeps.py +++ b/mininet/moduledeps.py @@ -21,10 +21,12 @@ OF_KMOD = 'ofdatapath' OVS_KMOD = 'openvswitch_mod' TUN = 'tun' -def moduleDeps( subtract = [], add = [] ): +def moduleDeps( subtract=None, add=None ): """Handle module dependencies. subtract: string or list of module names to remove, if already loaded add: string or list of module names to add, if not already loaded""" + subtract = subtract if subtract is not None else [] + add = add if add is not None else [] if type( subtract ) is str: subtract = [ subtract ] if type( add ) is str: @@ -51,4 +53,4 @@ def moduleDeps( subtract = [], add = [] ): error( 'Failed to insert ' + mod + '\n' ) exit( 1 ) else: - debug( '*** ' + mod + ' already loaded\n' ) \ No newline at end of file + debug( '*** ' + mod + ' already loaded\n' )