Fixed small bug in conf_parser.py file that would return an error in case there was an empty line in [link] session or an empty-options host in [nodes] section of the .config file
diff --git a/mininet/conf_parser.py b/mininet/conf_parser.py
index d8d8374..225827d 100644
--- a/mininet/conf_parser.py
+++ b/mininet/conf_parser.py
@@ -31,7 +31,17 @@
hosts = []
items = config.items('nodes')
+
+ #makes a first-pass read to nodes section to find empty nodes sections
+ for item in items:
+ name = item[0]
+ rest = item[1].split()
+ if len(rest) == 0:
+ config.set('nodes', name, '_')
+ #updates 'items' list
+ items = config.items('nodes')
+ #makes a second-pass read to nodes section to properly add hosts
for item in items:
name = item[0]
@@ -110,6 +120,11 @@
break
args = line.split()
+
+ #checks for non-empty line
+ if len(args) == 0:
+ continue
+
h1, h2 = args.pop(0).split(':')
link_dict = {}