Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 86687b0

Browse files
author
Jay Logue
authored
Merge pull request #377 from openweave/issue/simnet-shell-command-failure
Fixed bug in simnet 'shell' command
2 parents e2584d8 + fbf1964 commit 86687b0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/tools/simnet/simnet.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,10 +1630,9 @@ def deleteBridge(name, nsName=None):
16301630
def getNamespaces():
16311631
out = runCmd([ 'ip', 'netns', 'list' ], errMsg='Failed to enumerate network namespaces')
16321632
for line in re.split('\n', out):
1633-
line = line.strip()
1634-
if len(line) == 0:
1635-
continue
1636-
yield line
1633+
m = re.match('\s*([^\s]+)', line)
1634+
if m:
1635+
yield m.group(1)
16371636

16381637
def addNamespace(name):
16391638
runCmd([ 'ip', 'netns', 'add', name ], errMsg='Failed to create network namespace %s' % (name))

0 commit comments

Comments
 (0)