Skip to content
Snippets Groups Projects
Commit 8abc3472 authored by Bob Lantz's avatar Bob Lantz
Browse files

Pass code check.

parent ec7b211c
No related branches found
No related tags found
No related merge requests found
......@@ -21,10 +21,12 @@ def modprobe( mod ):
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' )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment