Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nemu3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
nemu3
Commits
96656176
Commit
96656176
authored
Aug 24, 2010
by
Martín Ferrari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug which caused an infinite loop when creating a NodeInterface with an invalid parameter
parent
168ed41e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
src/netns/interface.py
src/netns/interface.py
+11
-4
No files found.
src/netns/interface.py
View file @
96656176
...
@@ -56,7 +56,17 @@ class NSInterface(Interface):
...
@@ -56,7 +56,17 @@ class NSInterface(Interface):
# some black magic to automatically get/set interface attributes
# some black magic to automatically get/set interface attributes
def
__getattr__
(
self
,
name
):
def
__getattr__
(
self
,
name
):
iface
=
self
.
_slave
.
get_if_data
(
self
.
index
)
# If name starts with _, it must be a normal attr
if
name
[
0
]
==
'_'
:
return
super
(
Interface
,
self
).
__getattribute__
(
name
)
try
:
slave
=
super
(
Interface
,
self
).
__getattribute__
(
"_slave"
)
except
:
# Not initialised yet
return
super
(
Interface
,
self
).
__getattribute__
(
name
)
iface
=
slave
.
get_if_data
(
self
.
index
)
return
getattr
(
iface
,
name
)
return
getattr
(
iface
,
name
)
def
__setattr__
(
self
,
name
,
value
):
def
__setattr__
(
self
,
name
,
value
):
...
@@ -349,9 +359,6 @@ class Switch(ExternalInterface):
...
@@ -349,9 +359,6 @@ class Switch(ExternalInterface):
setattr
(
iface
,
name
,
value
)
setattr
(
iface
,
name
,
value
)
netns
.
iproute
.
set_bridge
(
iface
)
netns
.
iproute
.
set_bridge
(
iface
)
def
__del__
(
self
):
self
.
destroy
()
def
destroy
(
self
):
def
destroy
(
self
):
if
not
self
.
index
:
if
not
self
.
index
:
return
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment